matrix-org / matrix-org/matrix-spec

Unspecced 'sender' field on presence events in /sync

Open Beginner friendly
#662 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-Client-Server spec-omission
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

The [/sync spec](https://matrix.org/docs/spec/client_server/r0.6.1#get-matrix-client-r0-sync) claims:

- The `presence` property is of type `Presence`
- The `Presence` type has an `events` property that contains an array of `Event`-type items
- The `Event` type has `content` and `type` fields

However, in practice, the presence events also contain a `sender` field, which is not accounted for in the spec:

```js
// ...
"presence": {
"events": [{
"type": "m.presence",
"sender": "@redacted1:example.com",
"content": {
"presence": "offline",
"last_active_ago": 55595
}
}, {
"type": "m.presence",
"sender": "@redacted2:example.com",
"content": {
"presence": "offline",
"last_active_ago": 38143
}
},
// ...
```

This `sender` property *is* [specified for the `to_device` events](https://matrix.org/docs/spec/client_server/r0.6.1#extensions-to-sync), but that has no relation to `presence`.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the /sync specification's presence events and the linked Event and to_device event definitions. Compare the documented presence event fields with the example, then update the presence event definition so the sender field is accounted for; the issue is done when the /sync spec matches the shown response.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.