mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 21:34:51 -04:00
Noop device key changes if they're the same
This commit is contained in:
parent
e75a779d9e
commit
c2c9a78db9
3 changed files with 45 additions and 15 deletions
|
@ -287,11 +287,12 @@ class E2eKeysHandler(object):
|
|||
device_id, user_id, time_now
|
||||
)
|
||||
# TODO: Sign the JSON with the server key
|
||||
yield self.store.set_e2e_device_keys(
|
||||
user_id, device_id, time_now,
|
||||
encode_canonical_json(device_keys)
|
||||
changed = yield self.store.set_e2e_device_keys(
|
||||
user_id, device_id, time_now, device_keys,
|
||||
)
|
||||
yield self.device_handler.notify_device_update(user_id, [device_id])
|
||||
if changed:
|
||||
# Only notify about device updates *if* the keys actually changed
|
||||
yield self.device_handler.notify_device_update(user_id, [device_id])
|
||||
|
||||
one_time_keys = keys.get("one_time_keys", None)
|
||||
if one_time_keys:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue