Skip to content

Commit

Permalink
modmail fix
Browse files Browse the repository at this point in the history
  • Loading branch information
itsthejoker committed Oct 24, 2022
1 parent ff7bb3d commit 96f426c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions bubbles/commands/modmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,16 @@ def build_and_send_message(
if len(convo.messages) == 1 and (
message.author == participant or isinstance(participant, Subreddit)
):
# we were sent a message!
sender = participant
recipient = sub
# WAIT! We _might_ have been sent a message, but the modmail API doesn't
# make that clear.
if message.author in [i for i in sub.moderator()]:
# The author is one of our moderators, so we sent it.
sender = sub
recipient = participant
else:
# we were sent a message!
sender = participant
recipient = sub
elif len(convo.messages) == 1 and message.author != participant:
sender = message.author
recipient = participant
Expand Down

0 comments on commit 96f426c

Please sign in to comment.