clokep
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- # MSCxxxx: Ranged read receipts ## Problem Matrix currently only has the concept of read receipts which describe the most recent message in a room which has been read by the user (aggregated across all clients). In practice, this is insufficient for many use cases: * It's impossible to express per-message or per-range-of-message read state for messages bridged from other platforms which support those semantics (e.g. WhatsApp, iMessage, SMS, Facebook Messenger, Hangouts, Threema, IMAP, NNTP, Reddit, HackerNews...). Therefore Matrix doesn't fulfil its role as a highest-common denominator bridging language between different platforms. * Read Markers end up being a very best-effort guess as to "where a user read up to" in a room. Currently this is modelled as a `m.fully_read` read receipt, but in practice users read rooms in blocks, and the second you open a room it forgets the previous unread blocks. * Similarly, notification counts in unread blocks immediately get zeroed out when you open a room, even if you haven't read them yet. * Another related problem is that if unread messages arrive out of order (e.g. due to netsplits or other federation delays), we currently have no alternative than append them to the timeline on the room to make the user aware of their existence. But with if we had read receipts as ranges, we could explicitly mark these blocks as unread in history. * As there is no way to indicate which messages have actually been read when you send a normal `m.read` receipt into a room, the act of sending an `m.read` receipt on a unthread-enabled client will mark all threads in the room as read, and zero their badge counts, which is very undesirable if you are also using thread-enabled clients. * Currently we can't do selective "mark as (un)read" behaviour (e.g. as could be used as a basic bookmarking mechanism). ## Solution Modify receipts to have both a starting and ending event (today they are just an endpoint) and allow multiple receipts of the same type per room. These are referred to as "ranged read receipts". <-- Does this *change* the current receipts or is it a new receipt type? (Likely changing the current ones is better?) * TBD if using events as the markers (as current receipts do) makes sense or maybe sync/pagination tokens? They can be sent referring to the merged (i.e. unthreaded) timeline (whereupon the server must expand them out to apply them to the messages in the component threads within that range), or for individual threads (including the main timeline). * Servers likely should coalesce overlapping ranges as well. Switch to topological ordering on clients, so that: * Stale messages appear at the right topological place (is this the right behaviour though? should we present them to the client as threads? or should we order things based on origin timestamp, which is what the user would expect?) * This means that clients will be able to interpret ranges in read receipts correctly when visualising them locally. Bits to include: * How does this affect notifications? Local echo for clients. * Servers do *not* need to calculate notif badges on the hot path (although they may today). This can be done after the message has been sent, as long as the client effectively does local echo in order to preempt that the badge count has reduced based on the messages the client knows the user has seen. * How does this affect sync? * Clients need to know about the regions they've read (and not read), keep using ephemeral "events" key in sync or use something else? * Federation? * Send the "maximal" read point (of each thread) to preserve privacy (sending all ranges seems excessive). (and this can be a separate MSC) * Changes to handling of "historical content" received from offline homeservers? (Does this include/affect MSC2716 at all?) --> ordering of timelines is now consistently topological, meaning that clients should be able to consider the same events as servers. * Maybe powering mark as unread (but likely punt to future MSC to fully define). ### Stuff to solve From talking it through with Andy Balaam, a few interesting things came up... * What if the events in the range aren't actually connected in the DAG, or don't follow one another in the DAG? * How do you define the "most recent" value in a range? (Either for sending over federation, or if you're a client and you don't want to handle ranges but you keep getting range receipts; which ones are the 'newest' ones?). * Specifically, if you're a client, and you receive some random read-range from the server, is that a 'most recent event' or something historical? The server presumably should do this on behalf of the client and decorate the read-ranges appropriately, given the client doesn't have visibility of the DAG.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully