Skip to content

discord: Ignore old message edits#199

Merged
poVoq merged 1 commit into
matterbridge-org:masterfrom
soliton-:soliton-discord-ignore-edits
Apr 17, 2026
Merged

discord: Ignore old message edits#199
poVoq merged 1 commit into
matterbridge-org:masterfrom
soliton-:soliton-discord-ignore-edits

Conversation

@soliton-

Copy link
Copy Markdown

Since discord occasionally sends spurious message edits for old messages make it possible to ignore those older than MaxEditDays.

Based on https://github.com/42wim/matterbridge/pull/2239/changes and discussion in #132.

@soliton- soliton- force-pushed the soliton-discord-ignore-edits branch from 9a4ffca to 92e1510 Compare April 15, 2026 13:17
@poVoq

poVoq commented Apr 15, 2026

Copy link
Copy Markdown
Collaborator

Great. Do you think it would be hard to make the max edit duration configurable?

Also, we need a changelog entry and documentation in the Discord bridge docs for it.

Thanks.

@soliton-

Copy link
Copy Markdown
Author

Great. Do you think it would be hard to make the max edit duration configurable?

Based on #132 (comment) I believe that is already in. Still needs a default and probably a special value like -1 to disable.

Also, we need a changelog entry and documentation in the Discord bridge docs for it.

I'll figure out what that means. Ideally I'd like to know how to handle the lint issue and have confirmation on the config setting before documenting it.

Well, actually I just asked on IRC about the lint issue. The same code the linter mentions already exists in the pre-existing line above and there are more cases in the file as far as I can tell so it might be weird to just change one instance? How is that normally handled?

@poVoq

poVoq commented Apr 16, 2026

Copy link
Copy Markdown
Collaborator

We decided to fix lint issues only as they come up. Fixing the entire codebase would be a lot of work and just ignoring them entirely seems like a bad idea. So hopefully over time they get fixed as people touch parts of the codebase.

@soliton- soliton- force-pushed the soliton-discord-ignore-edits branch from 92e1510 to 6a94029 Compare April 16, 2026 13:49
@soliton-

Copy link
Copy Markdown
Author

Changed the setting to EditMaxDays since the other edit settings also start with Edit. Default of 0 means it is disabled.

Documentation should be all there now? (Fixed indentation of the whatsapp entry in the changelog)

@soliton-

Copy link
Copy Markdown
Author

Btw, even better would be to ignore edits that don't actually change anything since those also happen earlier and are not useful to show either. No idea how to do that though...

@poVoq

poVoq commented Apr 16, 2026

Copy link
Copy Markdown
Collaborator

Might be too complicated to add that.

Overall the PR looks good now, but maybe you could still add a note to the documentation that this global config variable is currently only supported by the Discord bridge? Thanks!

Since discord occasionally sends spurious message edits for old messages make it possible to ignore those older than EditMaxDays.
@soliton- soliton- force-pushed the soliton-discord-ignore-edits branch from 6a94029 to 6c5531b Compare April 17, 2026 11:11
@poVoq poVoq merged commit e89a4f6 into matterbridge-org:master Apr 17, 2026
7 checks passed
@soliton- soliton- deleted the soliton-discord-ignore-edits branch April 17, 2026 15:21
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