This document collects various quirks and useful pieces of information that I came across in adding support for the new modmail API to PRAW.
Certain pieces of data are represented by numerical codes, which had to be deciphered through trial and error. These lists could easily be incomplete.
Thanks to /u/creesch for finding these.
Code | Meaning |
---|---|
0 | highlight |
1 | un-highlight |
2 | archive |
4 | "reported to admins" (reserved for future use) |
3 | un-archive |
5 | mute |
6 | un-mute |
Code | Meaning |
---|---|
0 | new |
1 | inprogress |
2 | archived |
For state
parameters, all
does not include conversations which have been archived or mod conversations. In other words, it shows conversations that appear in the "All Modmail" tab on Reddit's web interface.
This endpoint is actually at POST /api/mod/conversations/bulk/read
.
The entity
parameter is required, and can't be 'all'
. So, if you want to
mark every conversation as read, you need to list all subreddits you moderate
which are using the new modmail.
The default sort
is recent
, and the default state
is all
. limit
can be
very high; I got up to 1998 before I ran out of modmails with which to test.
According to documentation, the to
parameter is the "Modmail conversation
recipient fullname." In fact, it is the display name.
Even for a private moderator note (i.e. with isInternal
set to true
),
isAuthorHidden
can be set to either true
or false
. This apparently makes
no functional difference (since moderators can see hidden authors, and only
moderators can see the message), but it makes a cosmetic difference: the
crossed-out silhouette icon next to the author's name will be toggled.
The response looks just like the response from GET /api/mod/conversations/:conversation_id
, except that the conversation
key is
named conversations
instead.
This doesn't appear to return any information that isn't already contained in
GET /api/mod/conversations/:conversation_id/user
.