backfill: add a backfill_read_messages = false option#12
Merged
Conversation
Connect to an existing Matrix account from IRC, lots of ancient messages from rooms and DMs are backfilled, leading to a lot of noise. This is useful if your IRC clinet stores no logs, but e.g. weechat shows the last few messages in a DM based on local logs, so the backfill of read messages in DM rooms is just noise. Fix the problem by adding a new config option, `backfill_read_messages`: if that's false, then query read receipts and also the last own message and stop the backfill for messages older than those. Tracking own messages is helpful since even if a message has no read receipt, if there is an own reply to that, then we know that message is practically seen. Also fix a problem in src/irc/conn.rs: it can happen that the IRC client connects first and the DM is only discovered a little bit later, now we backfill in that case correctly, too. The case I had was like this: - 19:41:49.055: rooms discovered during startup population - 19:41:49.078: backfill for the room happens That 23ms gap means my IRC client was already connected when matrix finished populating the bridge and then a non-DM event was backfilled correctly but a DM one was not. Fixes <pawelb0#10>.
Owner
|
nice! thanks |
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.
Connect to an existing Matrix account from IRC, lots of ancient messages from rooms and DMs are backfilled, leading to a lot of noise.
This is useful if your IRC clinet stores no logs, but e.g. weechat shows the last few messages in a DM based on local logs, so the backfill of read messages in DM rooms is just noise.
Fix the problem by adding a new config option,
backfill_read_messages: if that's false, then query read receipts and also the last own message and stop the backfill for messages older than those. Tracking own messages is helpful since even if a message has no read receipt, if there is an own reply to that, then we know that message is practically seen.Also fix a problem in src/irc/conn.rs: it can happen that the IRC client connects first and the DM is only discovered a little bit later, now we backfill in that case correctly, too. The case I had was like this:
Fixes #10.