Skip to content

Fix: ScamBlocker does not scan edited messages#1519

Open
KonstantineVashalomidze wants to merge 2 commits into
Together-Java:developfrom
KonstantineVashalomidze:feature/fix-scam-blocker-edited-messages
Open

Fix: ScamBlocker does not scan edited messages#1519
KonstantineVashalomidze wants to merge 2 commits into
Together-Java:developfrom
KonstantineVashalomidze:feature/fix-scam-blocker-edited-messages

Conversation

@KonstantineVashalomidze

Copy link
Copy Markdown

Fixes: #1516

ScamBlocker only 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 accept Message and Guild parameters directly instead of the event object.

Tested this manually (Since there is no ScamBlockerTest) on a local test discord server.

@KonstantineVashalomidze KonstantineVashalomidze requested a review from a team as a code owner July 10, 2026 18:29
@CLAassistant

CLAassistant commented Jul 10, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@Zabuzard Zabuzard left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@KonstantineVashalomidze

KonstantineVashalomidze commented Jul 10, 2026

Copy link
Copy Markdown
Author

@Zabuzard
Thanks for the feedback. I see your point. If such cases hasn't happened or doesn't happen usually I will be happy to close this PR.

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.

ScamBlocker doesn't scan edited messages, allowing scam

3 participants