mirror of
https://github.com/element-hq/synapse
synced 2024-08-20 13:10:20 +00:00
Doc args
This commit is contained in:
parent
d61a04583e
commit
fbfe44bb4d
2 changed files with 11 additions and 0 deletions
|
@ -223,6 +223,13 @@ class DeviceHandler(BaseHandler):
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def get_user_ids_changed(self, user_id, from_token):
|
def get_user_ids_changed(self, user_id, from_token):
|
||||||
|
"""Get list of users that have had the devices updated, or have newly
|
||||||
|
joined a room, that `user_id` may be interested in.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
user_id (str)
|
||||||
|
from_token (StreamToken)
|
||||||
|
"""
|
||||||
rooms = yield self.store.get_rooms_for_user(user_id)
|
rooms = yield self.store.get_rooms_for_user(user_id)
|
||||||
room_ids = set(r.room_id for r in rooms)
|
room_ids = set(r.room_id for r in rooms)
|
||||||
|
|
||||||
|
|
|
@ -247,6 +247,10 @@ class StreamStore(SQLBaseStore):
|
||||||
def get_rooms_that_changed(self, room_ids, from_key):
|
def get_rooms_that_changed(self, room_ids, from_key):
|
||||||
"""Given a list of rooms and a token, return rooms where there may have
|
"""Given a list of rooms and a token, return rooms where there may have
|
||||||
been changes.
|
been changes.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
room_ids (list)
|
||||||
|
from_key (str): The room_key portion of a StreamToken
|
||||||
"""
|
"""
|
||||||
from_key = RoomStreamToken.parse_stream_token(from_key).stream
|
from_key = RoomStreamToken.parse_stream_token(from_key).stream
|
||||||
return set(
|
return set(
|
||||||
|
|
Loading…
Reference in a new issue