diff options
author | Hubert Chathi <hubert@uhoreg.ca> | 2019-07-25 11:08:24 -0400 |
---|---|---|
committer | Hubert Chathi <hubert@uhoreg.ca> | 2019-07-25 11:08:24 -0400 |
commit | c659b9f94fff29adfb2abe4f6b345710b65e8741 (patch) | |
tree | 54d00d836461f071276f9c7e776766e8ebd6200a /synapse/handlers/device.py | |
parent | allow devices to be marked as "hidden" (diff) | |
download | synapse-c659b9f94fff29adfb2abe4f6b345710b65e8741.tar.xz |
allow uploading keys for cross-signing
Diffstat (limited to 'synapse/handlers/device.py')
-rw-r--r-- | synapse/handlers/device.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index 99e8413092..2a8fa9c818 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- # Copyright 2016 OpenMarket Ltd +# Copyright 2019 New Vector Ltd +# Copyright 2019 The Matrix.org Foundation C.I.C. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -409,6 +411,21 @@ class DeviceHandler(DeviceWorkerHandler): self.federation_sender.send_device_messages(host) @defer.inlineCallbacks + def notify_user_signature_update(self, from_user_id, user_ids): + """Notify a user that they have made new signatures of other users. + + Args: + from_user_id (str): the user who made the signature + user_ids (list[str]): the users IDs that have new signatures + """ + + position = yield self.store.add_user_signature_change_to_streams( + from_user_id, user_ids + ) + + self.notifier.on_new_event("device_list_key", position, users=[from_user_id]) + + @defer.inlineCallbacks def on_federation_query_user_devices(self, user_id): stream_id, devices = yield self.store.get_devices_with_keys_by_user(user_id) defer.returnValue( |