Skip to content

Proper fix for deleting messages in the backend channel#78

Merged
MMK21Hub merged 2 commits intohackclub:mainfrom
MMK21Hub:fix-deleting-backend-messages
Oct 26, 2025
Merged

Proper fix for deleting messages in the backend channel#78
MMK21Hub merged 2 commits intohackclub:mainfrom
MMK21Hub:fix-deleting-backend-messages

Conversation

@MMK21Hub
Copy link
Copy Markdown
Collaborator

@transcental you were right about not needing the use_impersonation check :P

@deoshreyas this fixes the bug we were having with messages not being deleted from the tickets channel :)

- Yeah turns out deleting impersonated messages still works with a bot token
- Partially reverts hackclub#74
Copilot AI review requested due to automatic review settings October 26, 2025 15:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug where messages were not being deleted properly from the ticket channel by removing the conditional impersonation logic and implementing proper message deletion based on workspace admin permissions.

Key Changes:

  • Removed the use_impersonation check that prevented setting username and icon_url
  • Added conditional message deletion logic based on admin availability

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
nephthys/events/message.py Removed use_impersonation logic to always set username and icon_url for ticket messages
nephthys/actions/resolve.py Added conditional message deletion using either queue-based or direct deletion depending on admin permissions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread nephthys/actions/resolve.py
@MMK21Hub MMK21Hub added this pull request to the merge queue Oct 26, 2025
Merged via the queue into hackclub:main with commit a10d0d4 Oct 26, 2025
4 checks passed
@MMK21Hub MMK21Hub deleted the fix-deleting-backend-messages branch October 26, 2025 16:12
@transcental transcental mentioned this pull request Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants