diff options
author | Matthew Hodgson <matthew@matrix.org> | 2018-07-24 20:34:45 +0100 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2018-07-24 20:34:45 +0100 |
commit | cb5c37a57c387a74f6079008870cf024e674dfe5 (patch) | |
tree | f2e22424580f8188cb50d75e140d6196ee9ff8a0 /synapse | |
parent | Merge branch 'develop' into matthew/filter_members (diff) | |
download | synapse-cb5c37a57c387a74f6079008870cf024e674dfe5.tar.xz |
handle the edge case for _get_some_state_from_cache where types is []
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/storage/state.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py index 86f2c2e6b1..989977c644 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -547,7 +547,13 @@ class StateGroupWorkerStore(SQLBaseStore): return True return False - got_all = is_all or not missing_types + if types == [] and filtered_types is not None: + # special wildcard case for empty type-list but an explicit filtered_types + # which means that we'll try to return all types which aren't in the + # filtered_types list. missing_types will always be empty, so we ignore it. + got_all = is_all + else: + got_all = is_all or not missing_types return { k: v for k, v in iteritems(state_dict_ids) |