-
-
Notifications
You must be signed in to change notification settings - Fork 43
fix(harmful command): check irc bridge messages too #1000
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Reviewer's GuideExtend the harmful message handler to process IRC bridge messages by refining the bot filter to respect a whitelist of bridge webhook IDs. Sequence diagram for harmful message handling with IRC bridge supportsequenceDiagram
participant Discord
participant EventHandler as HarmfulMessageHandler
participant Config
Discord->>EventHandler: handle_harmful_message(message)
EventHandler->>EventHandler: Check if message.author.bot
EventHandler->>Config: Check if message.webhook_id in BRIDGE_WEBHOOK_IDS
alt Bot and not from bridge webhook
EventHandler-->>Discord: Return (do nothing)
else Not a bot or from bridge webhook
EventHandler->>EventHandler: Process message (strip formatting, etc.)
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1000 +/- ##
========================================
- Coverage 9.57% 9.56% -0.01%
========================================
Files 123 123
Lines 10415 10415
Branches 1279 1279
========================================
- Hits 997 996 -1
- Misses 9316 9317 +1
Partials 102 102
*This pull request uses carry forward flags. Click here to find out more.
☔ View full report in Codecov by Sentry. |
CONGRATULATIONS ON THE 1000TH PULL/ISSUE |
yeah i had this change in the back of my mind for a while and saw you saying we were one away in atl.dev tee hee :3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Makes it so the warning message is also sent when a message is coming from the IRC bridge
Guidelines
My code follows the style guidelines of this project (formatted with Ruff)
I have performed a self-review of my own code
I have commented my code, particularly in hard-to-understand areas
I have made corresponding changes to the documentation if needed
My changes generate no new warnings
I have tested this change
Any dependent changes have been merged and published in downstream modules
I have added all appropriate labels to this PR
I have followed all of these guidelines.
How Has This Been Tested? (if applicable)
see below
Screenshots (if applicable)
Additional Information
Please add any other information that is important to this PR.
Summary by Sourcery
Bug Fixes: