Skip to content

Commit

Permalink
Deleting messages no longer shows a false error, resolves #2910
Browse files Browse the repository at this point in the history
  • Loading branch information
fourjr committed Jan 6, 2021
1 parent a6ebd81 commit beb73d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ however, insignificant breaking changes do not guarantee a major version bump, s
- Custom emojis are now supported in `confirm_thread_creation_deny`. ([GH #2916](https://github.com/kyb3r/modmail/issues/2916))
- Finding linked messages in replies work now. ([GH #2920](https://github.com/kyb3r/modmail/issues/2920), [Jerrie-Aries](https://github.com/kyb3r/modmail/issues/2920#issuecomment-751530495))
- Sending files in threads (non-images) now work. ([GH #2926](https://github.com/kyb3r/modmail/issues/2926))
- Deleting messages no longer shows a false error. ([GH #2910](https://github.com/kyb3r/modmail/issues/2910), [Jerrie-Aries](https://github.com/kyb3r/modmail/issues/2910#issuecomment-753557313))

### Internal

Expand Down
2 changes: 1 addition & 1 deletion core/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ async def delete_message(
tasks = []
if not isinstance(message, discord.Message):
tasks += [message1.delete()]
if message2 is not None:
elif message2 is not None:
tasks += [message2.delete()]
elif message1.embeds[0].author.name.startswith("Persistent Note"):
tasks += [self.bot.api.delete_note(message1.id)]
Expand Down

0 comments on commit beb73d8

Please sign in to comment.