Fix: ScamBlocker does not scan edited messages#1519
Closed
KonstantineVashalomidze wants to merge 2 commits into
Closed
Fix: ScamBlocker does not scan edited messages#1519KonstantineVashalomidze wants to merge 2 commits into
KonstantineVashalomidze wants to merge 2 commits into
Conversation
Zabuzard
requested changes
Jul 10, 2026
Zabuzard
left a comment
Member
There was a problem hiding this comment.
This was done on purpose as we never ever had scam that came through an edit so far.
Is this now a real use case? If not, I would probably vote to reject this PR as it would only bear risks (more false positives) than covering more (real) scam.
Author
|
@Zabuzard |
Author
|
Closing this pull request as it might introduce false positives of scam detection during edit, and since no scammers are trying to edit their messages with scam content that much. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #1516
ScamBlockeronly checked messages on creation (onMessageReceived), not on edit (onMessageUpdated). A user could send a clean message then edit it to contain scam content.Extracted the detection logic into a private
handleMessage(Message, Guild)method and called it from both event handlers. Several private methods were updated to acceptMessageandGuildparameters directly instead of the event object.Tested this manually (Since there is no
ScamBlockerTest) on a local test discord server.