Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chathistory Support #370

Open
wants to merge 37 commits into
base: main
Choose a base branch
from
Open

Commits on Jun 25, 2024

  1. Request chathistory capability when available.

    Add `id` component to messages, and record message id when available.
    Request all messages since last seen message or latest <=500 messages when joining a channel.
    Request <=500 older messages when scrolling to the top of channel buffer.
    Drop duplicate messages.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    f1f37b5 View commit details
    Browse the repository at this point in the history
  2. Fix timestamp message reference format.

    Initial timestamp-based depduplication.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    f5c871a View commit details
    Browse the repository at this point in the history
  3. Add event-playback support (and filter out HistServ messages in fav…

    …or of its utilization).
    
    Fix timestamp-based deduplication.
    Skip `RPL_TOPIC` and `RPL_TOPICWHOTIME` messages when looking for the oldest/latest message in a channel.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    581defa View commit details
    Browse the repository at this point in the history
  4. Load history before making latest messages requests in order to get u…

    …p-to-date message reference.
    
    Add fuzz interval to timestamp based `chathistory` requests.
    Ignore messages received at/after `JOIN` when finding the latest message in a channel (replaces ignoring `RPL_TOPIC` and `RPL_TOPICWHOTIME` messages).
    Ignore internal messages when finding the oldest/latest message in a channel.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    277b204 View commit details
    Browse the repository at this point in the history
  5. Restore filtering out of RPL_TOPIC and RPL_TOPICWHOTIME messages …

    …when finding oldest/latest message in channel.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    c098399 View commit details
    Browse the repository at this point in the history
  6. rustfmt (changes applied whenever running rustfmt src/main.rs, ot…

    …herwise unrelated to `chathistory`).
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    0938dc9 View commit details
    Browse the repository at this point in the history
  7. Restructuring to load History::Full for message reference and dedup…

    …lication, then convert to `History::Partial` for all channels without a pane.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    489c0e5 View commit details
    Browse the repository at this point in the history
  8. Ensure backlog divider appears before chathistory messages requeste…

    …d when joining a channel.
    
    Filter timestamp-based `chathistory` batches in order to reduce the need for record-time deduplication.
    Use hash of `Encoded` for client-side message-id (used to distinguish between timestamp-based `chathistory` messages with the same timestamp).
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    87d9ad2 View commit details
    Browse the repository at this point in the history
  9. Add button at the top of channel history for loading older `chathisto…

    …ry` messages.
    
    Add preference for automatically loading older `chathistory` messages when scrolled to the top of channel history.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    daa8d15 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c86b8d0 View commit details
    Browse the repository at this point in the history
  11. Find backlog divider by searching from most recent backwards, stoppin…

    …g at the first message that belongs in the backlog. This way the backlog divider won't be moved when messages are added to the beginning of a message history via `chathistory`.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    7b20edb View commit details
    Browse the repository at this point in the history
  12. Support for requesting older messages in Query buffers.

    Renamed configuration option to more typical phrase.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    f2f30e6 View commit details
    Browse the repository at this point in the history
  13. Fall back to LATEST request when there is no message reference.

    Use `server_time` to position message with respect to unreferenceable messages.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    21e7982 View commit details
    Browse the repository at this point in the history
  14. Off by one bug fix.

    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    b4ac47c View commit details
    Browse the repository at this point in the history
  15. Suggested changes (consolidations and better match coverage).

    Fix for `opened_at` calculation in `make_partial` (the earliest received message does not always appear at the beginning of the `unread_messages` vector).
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    b7f5430 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    add46ee View commit details
    Browse the repository at this point in the history
  17. Remove client id from timestamp-based chathistory.

    Other simplifications and clarifications suggested by review.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    adffe5f View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    b673ca7 View commit details
    Browse the repository at this point in the history
  19. Incorporate new insertion strategy into existing framework.

    Efficient deduplication via the new insertion strategy can be used in place of filtering received `chathistory` batches.
    Minor tweaks to insertion strategy: more stringent checking for triggering unread notification (to avoid false positives) and more relaxed matching for `JOIN`/`PART`/`QUIT` messages (to avoid false negatives).
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    868b8d5 View commit details
    Browse the repository at this point in the history
  20. Additional restructuring to improve code clarity and better allow for…

    … all `chathistory` subcommands.
    
    Switch from repeated `AFTER` subcommands to `LATEST` → repeated `BETWEEN` commands to receive history when joining a channel (`AFTER` can fail silently, with 0 returned messages, if the message reference is no longer in the history available from the server).
    Tweaks to `insert_message` (utilize same fuzz constant as `send_chathistory_request`) and to `is_referenceable_message` (disallow `RPL_TOPIC` and `RPL_TOPICWHOTIME` as message references).
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    31957d2 View commit details
    Browse the repository at this point in the history
  21. Add TARGETS chathistory subcommand structure (not yet utilized).

    Allow messages with matching content to match as duplicate without matching `server_time` iff the stored message is a sent message and the inserted message is a received message;  reduced strictness to match sent messages where the server's copy will have a slightly different time than the client.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    2a30f59 View commit details
    Browse the repository at this point in the history
  22. Asynchronous retrieval of the latest message reference when joining a…

    … channel.
    
    Messages retrieved when joining a channel are no longer properly deduplicated.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    b491e4c View commit details
    Browse the repository at this point in the history
  23. Message deduplication for messages requested when joining a channel.

    Channels will be marked as having unread messages even if those messages will ultimately wind up deduplicated.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    2f1662a View commit details
    Browse the repository at this point in the history
  24. Utilize TARGETS chathistory subcommand to get potential direct me…

    …ssages sent while the user was disconnected from the server.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    af2b3bd View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    a98d912 View commit details
    Browse the repository at this point in the history
  26. Ensure MSGREFTYPES ISUPPORT token is present before making `chathis…

    …tory` requests that depend on supported message reference types.
    
    Increase precision of message reference retrieval functions.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    fc507ea View commit details
    Browse the repository at this point in the history
  27. Initial implementation of read markers for properly interpreting `cha…

    …thistory` messages (and for persisting unread state across application close/open).
    
    Rearranges message storage.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    e026112 View commit details
    Browse the repository at this point in the history
  28. Clippy fixes.

    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    a481c9c View commit details
    Browse the repository at this point in the history
  29. When receiving an echo while chathistory is supported, insert into …

    …message history in order to store its `msgid`.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    fc50060 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    f876e40 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    65db3a9 View commit details
    Browse the repository at this point in the history
  32. Store echoed messages with message ids even if chathistory is support…

    …ed, in case support is later enabled.
    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    aa2aea1 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    9a7cc99 View commit details
    Browse the repository at this point in the history
  34. Changelog update.

    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    da1645b View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    22c0f94 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    f992ace View commit details
    Browse the repository at this point in the history
  37. Post-rebase fixes.

    andymandias committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    63d9de8 View commit details
    Browse the repository at this point in the history