|
|
|
@ -1008,14 +1008,14 @@ of the Client-Server API.
|
|
|
|
|
Matrix currently uses a custom pubsub system for synchronising information
|
|
|
|
|
about the list of devices for a given user over federation. When a server
|
|
|
|
|
wishes to determine a remote user's device list for the first time,
|
|
|
|
|
it should populate its local cache by calling the /user/keys/query API
|
|
|
|
|
it should populate its local cache by calling the ``/user/keys/query`` API
|
|
|
|
|
on the remote server. However, subsequent updates to the cache should be applied
|
|
|
|
|
by consuming ``m.device_list_update`` EDUs, which must be sent by the remote server
|
|
|
|
|
whenever a user's device list changes.
|
|
|
|
|
|
|
|
|
|
Servers send ``m.device_list_update`` EDUs in a sequence per source user, each with
|
|
|
|
|
a unique ``stream_id``. They also include a pointer to the most recent previous EDU(s)
|
|
|
|
|
that this update is relative to in the `pprev_id`` field. To simplify implementation
|
|
|
|
|
that this update is relative to in the ``prev_id`` field. To simplify implementation
|
|
|
|
|
for clustered servers which could send multiple EDUs at the same time, the ``prev_id``
|
|
|
|
|
field should include all ``m.device_list_update`` EDUs which have not been yet been
|
|
|
|
|
referenced in a EDU. If EDUs are emitted in series by a server, there should only ever
|
|
|
|
@ -1025,7 +1025,7 @@ This forms a simple directed acyclic graph of ``m.device_list_update`` EDUs, sho
|
|
|
|
|
which EDUs a server needs to have received in order to apply an update to its local
|
|
|
|
|
copy of the remote user's device list. If a server receives an EDU which refers to
|
|
|
|
|
a ``prev_id`` it does not recognise, it must resynchronise its list by calling the
|
|
|
|
|
/user/keys/query API and resume the process. The response contains a ``stream_id``
|
|
|
|
|
``/user/keys/query API`` and resume the process. The response contains a ``stream_id``
|
|
|
|
|
which should be used to correlate with subsequent ``m.device_list_update`` EDUs.
|
|
|
|
|
|
|
|
|
|
.. TODO: this whole thing desperately feels like it should just be state in a room,
|
|
|
|
|