Repository navigation
Report only Discord-identified message edits - #86
Merged
Merged
Conversation
GIF unfurls, chat replies, and the bot's own log posts arrive as MESSAGE_UPDATE without an edit timestamp and were logged as stacked edits.
jatmn
marked this pull request as ready for review
September 22, 2026 15:36
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. If the edit-detection or bot-message filtering is wrong, legitimate edits could be omitted or misleading report messages could be posted to Discord. Reverting restores the prior behavior, but reports already sent remain in the log and would need bounded cleanup.
5 of 6 tasks
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.
Summary
message_editlogs now require Discord'sedited_timestamp. GIF/link unfurls, chat-reply previews, pin/flag refreshes, and other Gateway updates that omit that timestamp are not reported as edits (Zeppelin showed none for the same window).Current textor mass-spam nested events.This implements the repository-scoped user report (including the follow-up that reply timestamps were mistaken for edits). No GitHub issue number was supplied.
Test plan
cargo test --locked -p jmodguard-bot logging::(21 passed), including GIF unfurl, reply-preview, bot-own log, and timestamped real-edit cases-D warnings, remainingbash scripts/ci-preflight.shgates on the candidate tree (cargo audit 2 advisories allowed for PRs)main(7035684/ PR Load daisyUI and Headless UI at runtime for searchable Guild WebUI selects #85); logging tests and bot Clippy re-run on488eda7message_editlogmessage_editlogReviewed and pushed head:
488eda712d2963b9c321776464382cc538d2ae98.Summary by Sourcery
Report only Discord-identified user message edits and exclude refresh events and the bot's own log messages.
Bug Fixes:
Enhancements:
Tests: