Skip to content

Commit

Permalink
fix: anon being shown in thread ping
Browse files Browse the repository at this point in the history
  • Loading branch information
Skelmis committed Mar 29, 2024
1 parent 68b617f commit 7e2d630
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
- [ ] Guild config method names aren't duplicated
- [ ] New localizations have been added
- [ ] Documentation on ``docs.suggestions.gg`` has been updated
- [ ] Do these changes make sure not to expose anonymous suggestion authors?
4 changes: 4 additions & 0 deletions suggestions/objects/suggestion.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,10 @@ async def create_thread(self, message: disnake.Message, *, ih: InteractionHandle
thread = await message.create_thread(
name=f"Thread for suggestion {self.suggestion_id}"
)
if self.is_anonymous:
# Dont expose the anon author
return

try:
await thread.send(
ih.bot.get_localized_string(
Expand Down

0 comments on commit 7e2d630

Please sign in to comment.