mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 14:04:59 -04:00
Convert room member storage tuples to attrs. (#10629)
Instead of using namedtuples. This helps with asserting type hints and code completion.
This commit is contained in:
parent
6e613a10d0
commit
bec01c0758
7 changed files with 55 additions and 30 deletions
|
@ -307,7 +307,9 @@ class RoomMemberWorkerStore(EventsWorkerStore):
|
|||
)
|
||||
|
||||
@cached()
|
||||
async def get_invited_rooms_for_local_user(self, user_id: str) -> RoomsForUser:
|
||||
async def get_invited_rooms_for_local_user(
|
||||
self, user_id: str
|
||||
) -> List[RoomsForUser]:
|
||||
"""Get all the rooms the *local* user is invited to.
|
||||
|
||||
Args:
|
||||
|
@ -522,7 +524,9 @@ class RoomMemberWorkerStore(EventsWorkerStore):
|
|||
_get_users_server_still_shares_room_with_txn,
|
||||
)
|
||||
|
||||
async def get_rooms_for_user(self, user_id: str, on_invalidate=None):
|
||||
async def get_rooms_for_user(
|
||||
self, user_id: str, on_invalidate=None
|
||||
) -> FrozenSet[str]:
|
||||
"""Returns a set of room_ids the user is currently joined to.
|
||||
|
||||
If a remote user only returns rooms this server is currently
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue