Skip to content

Commit bf85814

Browse files
author
Kerry Archibald
committed
matrix_client_information spec
1 parent 46b75c1 commit bf85814

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

spec/matrix_client_information.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# io.element.matrix_client_information.<device_id>: Storing additional client information per device
2+
3+
## Problem
4+
5+
Currently, sessions are only easily recognisable by their `display_name`. Depending on client implementation, this may
6+
include some stringified information about the session. (For example, Element Web uses `'%(appName)s (%(browserName)s,
7+
%(osName)s)'`). This information can become stale, and if edited by the user any device detail is lost.
8+
9+
By saving structured and up to date session information, users will be able to more easily recognise their sessions.
10+
This gives users more confidence in removing stale or suspicious sessions.
11+
12+
13+
## Proposal
14+
15+
We introduce the account_data event `io.element.matrix_client_information.<device_id>`.
16+
17+
An example event for a device with `device_id` of `abc123`:
18+
19+
```json5
20+
{
21+
"type": "io.element.matrix_client_information.abc123",
22+
"content": {
23+
"name": "Element Web",
24+
"version": "1.2.3",
25+
"url": "app.element.io"
26+
}
27+
}
28+
```
29+
30+
All properties are strings. `url` property is optional.
31+
32+
## Client advisory
33+
34+
When starting the client after login or update:
35+
1. Upsert an account data event with the type `io.element.matrix_client_information.<device_id>` for the current device
36+
37+
When rendering device application information:
38+
39+
1. Read account data event of type `io.element.matrix_client_information.<device_id>` for each given device.
40+
41+
These events should be pruned periodically.
42+
43+
## MSC
44+
Pruning of events depends on implementation of [MSC3391: Removing account
45+
data](https://github.com/matrix-org/matrix-spec-proposals/pull/3391)
46+
47+
## Security considerations
48+
N/A
49+
50+
## Implementations
51+
52+
* The `matrix-react-sdk` which powers Element Web and Desktop implemented this in September 2022.
53+
* https://github.com/matrix-org/matrix-react-sdk/pull/9314

0 commit comments

Comments
 (0)