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

Device manager - io.element.matrix_client_information spec #656

Merged
merged 1 commit into from
Sep 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions spec/matrix_client_information.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# io.element.matrix_client_information.<device_id>: Storing additional client information per device

## Problem

Currently, sessions are only easily recognisable by their `display_name`. Depending on client implementation, this may
include some stringified information about the session. (For example, Element Web uses `'%(appName)s (%(browserName)s,
%(osName)s)'`). This information can become stale, and if edited by the user any device detail is lost.

By saving structured and up to date session information, users will be able to more easily recognise their sessions.
This gives users more confidence in removing stale or suspicious sessions.


## Proposal

We introduce the account_data event `io.element.matrix_client_information.<device_id>`.

An example event for a device with `device_id` of `abc123`:

```json5
{
"type": "io.element.matrix_client_information.abc123",
"content": {
"name": "Element Web",
"version": "1.2.3",
"url": "app.element.io"
}
}
```

All properties are strings. `url` property is optional.

## Client advisory

When starting the client after login or update:
1. Upsert an account data event with the type `io.element.matrix_client_information.<device_id>` for the current device

When rendering device application information:

1. Read account data event of type `io.element.matrix_client_information.<device_id>` for each given device.

These events should be pruned periodically.

## MSC
Pruning of events depends on implementation of [MSC3391: Removing account
data](https://github.com/matrix-org/matrix-spec-proposals/pull/3391)

## Security considerations
N/A

## Implementations

* The `matrix-react-sdk` which powers Element Web and Desktop implemented this in September 2022.
* https://github.com/matrix-org/matrix-react-sdk/pull/9314