Repository navigation
Catch-up: send CHATHISTORY TARGETS newer bound first (#216) - #217
Merged
Merged
Conversation
TARGETS takes BETWEEN's semantics: both bounds exclusive, the limit counted from the first argument, the argument order sets the direction. Seance sent epoch then now + 1 day and expected the newest 100; once the ircd follows the spec (the fork's W5 Push E), that order returns the oldest 100, so an account in more than 100 channels would have its catch-up ordered by the wrong slice. Send now + 1 day first, the spec's own reconnect example. The answer is read into a map, so its order, its page edges and a missing draft/chathistory-end change nothing. Closes evilnet#216
This branch was previously deployed
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 #216.
CHATHISTORY TARGETStakes BETWEEN's semantics: the limit counts from the first argument, and the argument order sets the direction. The catch-up (client/js/irc/catchup.ts) sent the epoch first and now + 1 day second, and expected the newest 100 targets. Once the server follows the spec, that order returns the oldest 100, and an account in more than 100 channels gets its catch-up ordered by the wrong slice. Unlisted channels are still fetched, just later.Change
CHATHISTORY TARGETS timestamp=<now + 1 day> timestamp=1970-01-01T00:00:00.000Z <limit>, the spec's own reconnect example. Today's server ignores the argument order, so this can land before the servers change.draft/chathistory-targetsbatch closes, without readingdraft/chathistory-end, so a partial page is used like a full one.chathistory-partialisn't negotiated.test/irc/catchup.tspins the newer-first order, anddocs/projects/connect-burst.mdnotes why.Testing
test/irc/client.tsandtest/irc/catchup.ts: 107 passing.pnpm typecheck, prettier and oxlint are clean. CI is green on this PR.