This commit is contained in:
Matthew Hodgson 2018-03-11 20:10:25 +00:00
parent 9b334b3f97
commit 8713365265
2 changed files with 4 additions and 2 deletions

View File

@ -471,13 +471,13 @@ class SyncHandler(object):
if filter_members: if filter_members:
# We only request state for the members needed to display the # We only request state for the members needed to display the
# timeline: # timeline:
types = ( types = [
(EventTypes.Member, state_key) (EventTypes.Member, state_key)
for state_key in set( for state_key in set(
event.sender # FIXME: we also care about targets etc. event.sender # FIXME: we also care about targets etc.
for event in batch.events for event in batch.events
) )
) ]
types.append((None, None)) # don't just filter to room members types.append((None, None)) # don't just filter to room members
# TODO: we should opportunistically deduplicate these members too # TODO: we should opportunistically deduplicate these members too

View File

@ -301,6 +301,8 @@ class StateGroupWorkerStore(SQLBaseStore):
args = [next_group] args = [next_group]
if types: if types:
args.extend(i for typ in types for i in typ) args.extend(i for typ in types for i in typ)
if include_other_types:
args.extend(typ for (typ, _) in types)
txn.execute( txn.execute(
"SELECT type, state_key, event_id FROM state_groups_state" "SELECT type, state_key, event_id FROM state_groups_state"