synapse/handlers/device.py
def incoming_device_list_update(self, origin, edu_content):
        """Called on incoming device list update from federation. Responsible
        for parsing the EDU and adding to pending updates list.
        """

        user_id = edu_content.pop("user_id")
        device_id = edu_content.pop("device_id")
        stream_id = str(edu_content.pop("stream_id"))  # They may come as ints
        prev_ids = edu_content.pop("prev_id", [])
        prev_ids = [str(p) for p in prev_ids]   # They may come as ints

        if get_domain_from_id(user_id) != origin:
            # TODO: Raise?
            logger.warning("Got device list update edu for %r from %r", user_id, origin)
            return

        room_ids = yield self.store.get_rooms_for_user(user_id)
        if not room_ids:
            # We don't share any rooms with this user. Ignore update, as we
            # probably won't get any further updates.
            return

        self._pending_updates.setdefault(user_id, []).append(
            (device_id, stream_id, prev_ids, edu_content)
        )

        yield self._handle_device_updates(user_id)
Called on incoming device list update from federation. Responsible
        for parsing the EDU and adding to pending updates list.
        
Called on incoming device list update from federation. Responsible
for parsing the EDU and adding to pending updates list.
Called on incoming device list update from federation . Responsible for parsing the EDU and adding to pending updates list .
def incoming_device_list_update(self, origin, edu_content):
        user_id = edu_content.pop("user_id")
        device_id = edu_content.pop("device_id")
        stream_id = str(edu_content.pop("stream_id"))  
        prev_ids = edu_content.pop("prev_id", [])
        prev_ids = [str(p) for p in prev_ids]   
        if get_domain_from_id(user_id) != origin:
            logger.warning("Got device list update edu for %r from %r", user_id, origin)
            return
        room_ids = yield self.store.get_rooms_for_user(user_id)
        if not room_ids:
            return
        self._pending_updates.setdefault(user_id, []).append(
            (device_id, stream_id, prev_ids, edu_content)
        )
        yield self._handle_device_updates(user_id)
def incoming_device_list_update ( self , origin , edu_content ) : user_id = edu_content . pop ( "user_id" ) device_id = edu_content . pop ( "device_id" ) stream_id = str ( edu_content . pop ( "stream_id" ) ) prev_ids = edu_content . pop ( "prev_id" , [ ] ) prev_ids = [ str ( p ) for p in prev_ids ] if get_domain_from_id ( user_id ) != origin : logger . warning ( "Got device list update edu for %r from %r" , user_id , origin ) return room_ids = yield self . store . get_rooms_for_user ( user_id ) if not room_ids : return self . _pending_updates . setdefault ( user_id , [ ] ) . append ( ( device_id , stream_id , prev_ids , edu_content ) ) yield self . _handle_device_updates ( user_id )
Called on incoming device list update from federation.
Called on incoming device list update from federation .
"""Called on incoming device list update from federation. Responsible
        for parsing the EDU and adding to pending updates list.
        """ # They may come as ints # They may come as ints # TODO: Raise? # We don't share any rooms with this user. Ignore update, as we # probably won't get any further updates.
self
origin
edu_content