reddit / devvit

Reddit for Developers
https://developers.reddit.com
BSD 3-Clause "New" or "Revised" License
69 stars 17 forks source link

All messages sent by apps are being routed into Mod Discussions #89

Closed shiruken closed 3 weeks ago

shiruken commented 1 month ago

Info

As of late July, all messages sent by Devvit apps are being routed into the Mod Discussions section. This has resulted in a large number of complaints from subreddits because a) Mod Discussions cannot be archived and b) this section can easily be overwhelmed by automated messages. Numerous subreddits have disabled Modmail notifications or removed apps entirely because of this undesirable change in behavior.

Prior to the change, messages sent using createConversation were properly routed into the normal Modmail Inbox. Messages sent using sendPrivateMessage have always gone into Mod Discussions.

Desired/Expected Behavior

There needs to be a way to send messages to Modmail using the Devvit app account without routing them into the Mod Discussions section.

Examples

Both routes for sending messages as the Devvit app suffer from this problem:

await context.reddit.sendPrivateMessage({
  to: "r/my-test-subreddit",
  subject: "Test Subject",
  text: "Test Text",
});
await context.reddit.modMail.createConversation({
  to: "my-app",
  subject: "Test Subject",
  body: "Test Body",
  subredditName: "r/my-test-subreddit",
});
fsvreddit commented 1 month ago

There's a workaround for this that you or others may find useful. If your app doesn't need to handle modmail other than for creating a notification, and your code is using sendPrivateMessage, you can ask your users to remove the Modmail permission from the app account.

shiruken commented 1 month ago

Unfortunately several of my apps do use Modmail conversations to send follow-up messages so that's not an option.

I'm also worried about the changing of permissions possibly screwing up the installations in the future and I'd rather avoid subreddits having to uninstall/reinstall and losing the data stored in Redis. Also have no idea how we could even communicate with all installers about needing to re-add the Modmail permissions if that were necessary.

TheColorDarkBlue commented 1 month ago

Related issue #81

shannon-feng commented 3 weeks ago

I recently made a change which deprecates createConversation() in favor of 2 new functions:

the changes are available in devvit@next.

We still have an open issue to support sending mod notifications which is on my radar: https://github.com/reddit/devvit/issues/81