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

MSC4089: Delivery Receipts #4089

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

turt2live
Copy link
Member

@turt2live turt2live commented Jan 12, 2024

Rendered

In line with matrix-org/matrix-spec#1700, the following disclosure applies:

Author is a Matrix Spec Core Team (SCT) member, employed by Element, and operates the t2bot.io service. However, this proposal is written and published as a SCT member working in the area of the Digital Markets Act (DMA) and similar initiatives.


Implementation requirements:

  • Client sending delivery receipts in a privacy-respecting manner (such as a user preference option).
  • Server routing delivery receipts as required by the proposal.

@turt2live turt2live changed the title Delivery Receipts MSC4089: Delivery Receipts Jan 12, 2024
@turt2live turt2live added proposal A matrix spec change proposal client-server Client-Server API kind:feature MSC for not-core and not-maintenance stuff needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Jan 12, 2024
},
"m.delivery": {
"@user:example.org": {
"ts": 1661384801651, // same as m.read[.private]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since each client sends a delivery receipt, shouldn't we have one more level in here, giving device IDs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

er, yes. Good catch!

data limits just receiving these receipts. Servers should bundle delivery receipts to deliver them to
the client rather than sending each one individually.

**TODO**: Maybe we also limit size or require a client to opt-in with a filter param of some sort?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Random ideas:

  • state event indicating whether to send delivery receipts
  • only send delivery receipts in rooms up to a certain size
  • sender includes a property in the event indicating whether they want to receive delivery receipts

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like there could be a thing where the sending client whether they want to receive delivery receipts by sticking a property in the event, and that would be determined by settings or room size?

It feels a bit bbq v.s. banquet, and maybe things like join rules influence the likelihood that you care about receipts?

which is currently in use only by read (or "seen") receipts. We extend this module with a new `m.delivery`
receipt to track individual events being received by the client.

Delivery receipts are sent by all of a user's clients to report back to the event's sender that an
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do delivery receipts get sent to all of the sender's devices, or just the device that sent the event?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I intended this to be all of the sender's devices, but very open to opinions either way.

data limits just receiving these receipts. Servers should bundle delivery receipts to deliver them to
the client rather than sending each one individually.

**TODO**: Maybe we also limit size or require a client to opt-in with a filter param of some sort?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively: Perhaps we could require servers to suppress delivery receipts for public and/or large rooms? This would serve as a fallback for clients that may errorneously send these events, and would also allow servers to specify an upper bound (also see: presence).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we probably want to investigate this from a privacy angle rather than technical angle for now, as I'd like privacy to drive technology rather than technology drive privacy.

Co-authored-by: Denis Kasak <dkasak@termina.org.uk>
Comment on lines +17 to +19
Delivery receipts are sent by all of a user's clients to report back to the event's sender that an
event was decrypted successfully. They are not "up to" markers - they are for singular events. Other
users in the room do *not* see delivery receipts for events they didn't send.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a lot of data: (messages in a room) * (devices in a room) might be difficult to implement efficiently.

If it is doable though, might make more sense for m.read also. 🤷

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, there's vague ideas about only using delivery receipts in "trusted" rooms, where the number of devices and such is likely to be fewer.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having causal delivery would help us to know what others know, as their event would implicitly ack everything below it (prev_events). This does come with cost of having no gaps - when you join a room you need to download everything. That's not Client's concern however, but Home Servers'. They are "public inboxes" and they could indeed require causal delivery. Could "delivery receipts" be solved this way?

If a server receives a duplicate request to send a delivery receipt, it should 200 OK it. This is to
ensure that if a client fails to receive a response it doesn't retry forever.

## Potential issues
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any interaction with message edits? Do you still consider it delivered if the initial message was?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client-server Client-Server API kind:feature MSC for not-core and not-maintenance stuff needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. proposal A matrix spec change proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants