diff options
author | David Robertson <davidr@element.io> | 2022-05-17 17:06:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-17 16:06:45 +0000 |
commit | 5331fb5b478789a3ffaaeddb58f8d1cefd42a9eb (patch) | |
tree | abc584252f453004d1323b685d1c70e35a3d1194 /synapse | |
parent | Add some type hints to datastore (#12717) (diff) | |
download | synapse-5331fb5b478789a3ffaaeddb58f8d1cefd42a9eb.tar.xz |
allow `on_invalidate=None` in `@cached` methods (#12769)
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/storage/databases/main/roommember.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/databases/main/roommember.py b/synapse/storage/databases/main/roommember.py index 608d40dfa1..cc528fcf2d 100644 --- a/synapse/storage/databases/main/roommember.py +++ b/synapse/storage/databases/main/roommember.py @@ -15,6 +15,7 @@ import logging from typing import ( TYPE_CHECKING, + Callable, Collection, Dict, FrozenSet, @@ -634,7 +635,7 @@ class RoomMemberWorkerStore(EventsWorkerStore): ) async def get_rooms_for_user( - self, user_id: str, on_invalidate=None + self, user_id: str, on_invalidate: Optional[Callable[[], None]] = None ) -> FrozenSet[str]: """Returns a set of room_ids the user is currently joined to. |