Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 2366b38

Browse files
committed
Add on_invalidate to the function signature in the hopes that may make things work well
1 parent a71524c commit 2366b38

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

synapse/appservice/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from synapse.api.constants import EventTypes
2020
from synapse.events import EventBase
2121
from synapse.types import GroupID, JsonDict, UserID, get_domain_from_id
22-
from synapse.util.caches.descriptors import cached
22+
from synapse.util.caches.descriptors import _CacheContext, cached
2323

2424
if TYPE_CHECKING:
2525
from synapse.appservice.api import ApplicationServiceApi
@@ -166,7 +166,7 @@ async def _matches_user(
166166

167167
@cached(num_args=1, cache_context=True)
168168
async def matches_user_in_member_list(
169-
self, room_id: str, store: "DataStore", cache_context,
169+
self, room_id: str, store: "DataStore", cache_context: _CacheContext,
170170
) -> bool:
171171
"""Check if this service is interested a room based upon it's membership
172172

synapse/storage/databases/main/roommember.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def _check_safe_current_state_events_membership_updated_txn(self, txn):
145145
)
146146

147147
@cached(max_entries=100000, iterable=True)
148-
async def get_users_in_room(self, room_id: str) -> List[str]:
148+
async def get_users_in_room(self, room_id: str, **kwargs) -> List[str]:
149149
return await self.db_pool.runInteraction(
150150
"get_users_in_room", self.get_users_in_room_txn, room_id
151151
)

0 commit comments

Comments
 (0)