matrix-org / matrix-org/matrix-spec

Clarifying implicit read receipts / read receipts for sent messages

Open
#1,410 4 comments 4 reactions 0 assignees View on GitHub
clarification
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

I've been thinking about implicit read receipts lately. By "implicit read receipt" I mean the fact that messages sent by the user should obviously be marked as read by that user, even though clients don't send explicit read receipts for those messages.

Relevant spec sections:

The client behavior section of https://spec.matrix.org/v1.5/client-server-api/#receipts says

> Clients SHOULD NOT send read receipts for events sent by their own user.

https://spec.matrix.org/v1.5/client-server-api/#receiving-notifications says (emphasis mine)

> When the user updates their read receipt (either by using the API **or by sending an event**), notifications prior to and including that event MUST be marked as read.

From this information, one could extrapolate that explicit read receipts won't usually appear for messages that a user sent themselves, but everyone should act as if there was a read receipt.

However, implicit read receipts right now don't work consistently. I've seen some issues in Elements where bridges sending messages as the user with double puppeting didn't mark the room as read in the user's other clients. It also seems very easy to create new bugs like that in other clients since the read receipt spec doesn't say that implicit read receipts exist.

Due to such bugs, some of my bridges now break the first quoted spec and just send an explicit read receipt to get rid of the problem (I didn't know about that sentence in the spec when I made the bridges do that). When writing Beeper's bridge homeserver, we decided to always create an explicit read receipt when sending an event to get rid of those bugs completely in bridged rooms. We're considering making our Synapse do the same thing now to make Matrix rooms work properly too.

Is my assumption correct about how implicit read receipts work? If yes, should that be documented more explicitly in the spec? (or perhaps it already is and I missed it? I couldn't find anything else talking about the topic in the spec). If not, how is it actually supposed to work?

Would it make more sense to make a MSC that says servers must create an explicit read receipt along with events sent by the user? That way client developers wouldn't have to worry about the details as much and could just fully trust read receipts in /sync contains.

Contributor guide

Open the contributing guide

Research direction

Start with the linked Matrix client-server API sections on receipts and receiving notifications, then review the issue's examples involving bridges and sent events. Determine whether implicit read receipts are intended and whether the specification needs clarification or a separate MSC; done means the behavior and required documentation path are agreed.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.