0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 12:43:50 +01:00

Remove unused room_id arg

This commit is contained in:
Erik Johnston 2015-10-14 09:29:08 +01:00
parent 474274583f
commit 858634e1d0
4 changed files with 12 additions and 12 deletions

View file

@ -242,7 +242,7 @@ class FederationHandler(BaseHandler):
@defer.inlineCallbacks
def _filter_events_for_server(self, server_name, room_id, events):
event_to_state = yield self.store.get_state_for_events(
room_id, frozenset(e.event_id for e in events),
frozenset(e.event_id for e in events),
types=(
(EventTypes.RoomHistoryVisibility, ""),
(EventTypes.Member, None),

View file

@ -164,7 +164,7 @@ class MessageHandler(BaseHandler):
@defer.inlineCallbacks
def _filter_events_for_client(self, user_id, room_id, events):
event_id_to_state = yield self.store.get_state_for_events(
room_id, frozenset(e.event_id for e in events),
frozenset(e.event_id for e in events),
types=(
(EventTypes.RoomHistoryVisibility, ""),
(EventTypes.Member, user_id),
@ -290,7 +290,7 @@ class MessageHandler(BaseHandler):
elif member_event.membership == Membership.LEAVE:
key = (event_type, state_key)
room_state = yield self.store.get_state_for_events(
room_id, [member_event.event_id], [key]
[member_event.event_id], [key]
)
data = room_state[member_event.event_id].get(key)
@ -314,7 +314,7 @@ class MessageHandler(BaseHandler):
room_state = yield self.state_handler.get_current_state(room_id)
elif member_event.membership == Membership.LEAVE:
room_state = yield self.store.get_state_for_events(
room_id, [member_event.event_id], None
[member_event.event_id], None
)
room_state = room_state[member_event.event_id]
@ -406,7 +406,7 @@ class MessageHandler(BaseHandler):
elif event.membership == Membership.LEAVE:
room_end_token = "s%d" % (event.stream_ordering,)
deferred_room_state = self.store.get_state_for_events(
event.room_id, [event.event_id], None
[event.event_id], None
)
deferred_room_state.addCallback(
lambda states: states[event.event_id]
@ -499,7 +499,7 @@ class MessageHandler(BaseHandler):
def _room_initial_sync_parted(self, user_id, room_id, pagin_config,
member_event):
room_state = yield self.store.get_state_for_events(
member_event.room_id, [member_event.event_id], None
[member_event.event_id], None
)
room_state = room_state[member_event.event_id]

View file

@ -312,7 +312,7 @@ class SyncHandler(BaseHandler):
@defer.inlineCallbacks
def _filter_events_for_client(self, user_id, room_id, events):
event_id_to_state = yield self.store.get_state_for_events(
room_id, frozenset(e.event_id for e in events),
frozenset(e.event_id for e in events),
types=(
(EventTypes.RoomHistoryVisibility, ""),
(EventTypes.Member, user_id),

View file

@ -54,7 +54,7 @@ class StateStore(SQLBaseStore):
defer.returnValue({})
event_to_groups = yield self._get_state_group_for_events(
room_id, event_ids,
event_ids,
)
groups = set(event_to_groups.values())
@ -208,7 +208,7 @@ class StateStore(SQLBaseStore):
)
@defer.inlineCallbacks
def get_state_for_events(self, room_id, event_ids, types):
def get_state_for_events(self, event_ids, types):
"""Given a list of event_ids and type tuples, return a list of state
dicts for each event. The state dicts will only have the type/state_keys
that are in the `types` list.
@ -225,7 +225,7 @@ class StateStore(SQLBaseStore):
The dicts are mappings from (type, state_key) -> state_events
"""
event_to_groups = yield self._get_state_group_for_events(
room_id, event_ids,
event_ids,
)
groups = set(event_to_groups.values())
@ -251,8 +251,8 @@ class StateStore(SQLBaseStore):
)
@cachedList(cache=_get_state_group_for_event.cache, list_name="event_ids",
num_args=2)
def _get_state_group_for_events(self, room_id, event_ids):
num_args=1)
def _get_state_group_for_events(self, event_ids):
"""Returns mapping event_id -> state_group
"""
def f(txn):