@@ -659,6 +659,18 @@ def upload_signatures_for_device_keys(self, user_id, signatures):
659659
660660 @defer .inlineCallbacks
661661 def _process_self_signatures (self , user_id , signatures ):
662+ """Process uploaded signatures of the user's own keys.
663+
664+ Args:
665+ user_id (string): the user uploading the keys
666+ signatures (dict[string, dict]): map of devices to signed keys
667+
668+ Returns:
669+ (list[(string, string, string, string)], dict[string, dict[string, dict]]):
670+ a list of signatures to upload, in the form (signing_key_id, target_user_id,
671+ target_device_id, signature), and a map of users to devices to failure
672+ reasons
673+ """
662674 signature_list = []
663675 failures = {}
664676 if not signatures :
@@ -776,8 +788,18 @@ def _process_self_signatures(self, user_id, signatures):
776788
777789 @defer .inlineCallbacks
778790 def _process_other_signatures (self , user_id , signatures ):
779- # now check non-self signatures. These signatures will be signed
780- # by the user-signing key
791+ """Process uploaded signatures of other users' keys.
792+
793+ Args:
794+ user_id (string): the user uploading the keys
795+ signatures (dict[string, dict]): map of users to devices to signed keys
796+
797+ Returns:
798+ (list[(string, string, string, string)], dict[string, dict[string, dict]]):
799+ a list of signatures to upload, in the form (signing_key_id, target_user_id,
800+ target_device_id, signature), and a map of users to devices to failure
801+ reasons
802+ """
781803 signature_list = []
782804 failures = {}
783805 if not signatures :
0 commit comments