Closed eritbh closed 2 years ago
I did some testing and this should work. The only catch is that if the item isn't actually removed, the API will return a nonsense error about the ID not being correct.
Some additional thoughts:
I think I'm in favor of replacing the existing calls with these but using our existing calls as fallbacks. As far as I can tell, the removal reasons API this is related to has been pretty stable, so I'm not terribly worried about things drastically changing. Ideally we can eventually convince Reddit to document the modactions
APIs and then we can remove the fallbacks, but until then I think that makes sense to keep a fallback for what we can just in case.
Seems like a sensible approach. I am not entirely sure we can avoid using both our current endpoints and the new ones though, unless we want to take away options (and you know how well that can go over at times.
Frankly I'd be in favor of no longer offering the option to send as a personal PM. But that does leave a few other things.
So I am thinking that we might add a third radio button stating Reply through subreddit account with a comment to the item that is removed.
and only use the reddit api for that to begin with. So something like this:
We can then trial this a bit and see how stable it is while leaving everything else as is.
Alternatively, we could do something like this:
And replace the entire comment action with the reddit rr api call. I am however not sure if reddit removal reasons do sticky (by default) and if they don't if the removal reason API returns the ID of the posted comment.
I just checked by monitoring network in devtools when adding a removal reason on new reddit. It appears you get the ID back of the posted removal reason. However it seems like reddit removal reasons do sticky automatically which you can't undo as it is a different account...
god I completely forgot that we still support sending PMs as the user... I like the second option personally; splitting it up by comment actions and PM actions makes sense to me.
Fixed in #583
this issue is written in a really roundabout way because i'm tired and have no energy sorry. but yes this is about "remove as a subreddit"
As pointed out on Discord here, there's an unoffical/undocumented native endpoint for submitting removal reasons. It allows you to send the reason as a comment under a built-in subreddit shared account (this is new and recent). I would guess it will also be used for other things in the future, e.g. to show removal reasons left on users in mod notes or something like that.
The (undocumented) endpoints are
/api/v1/modactions/removal_comment_message
and/api/v1/modactions/removal_link_message
which take a body likeThe endpoints don't appear to require any hard link to the native removal reasons data (the
"title"
field is... something? but it doesn't appear to be reflected anywhere), so we should theoretically be able to modify the current Toolbox removal reasons module to use these endpoints to submit comments/modmails when leaving reasons with arbitrary text. We can also use this to support sending removal reason comments as the subreddit.