summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@arasphere.net>2018-07-26 00:03:01 +0100
committerGitHub <noreply@github.com>2018-07-26 00:03:01 +0100
commit1bcd0490c2fa93bda658b90b7a178d6aecb52dc0 (patch)
tree6de3de79dd1801a989783a217551b96422db85d4 /synapse/api
parentMerge pull request #3609 from matrix-org/travis/doc-typo-2 (diff)
parentswitch missing_types to be a bool (diff)
downloadsynapse-1bcd0490c2fa93bda658b90b7a178d6aecb52dc0.tar.xz
Merge pull request #2970 from matrix-org/matthew/filter_members
Implement the lazy_load_members room state filter parameter
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/filtering.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/synapse/api/filtering.py b/synapse/api/filtering.py
index 25346baa87..7e767b9bf5 100644
--- a/synapse/api/filtering.py
+++ b/synapse/api/filtering.py
@@ -113,7 +113,10 @@ ROOM_EVENT_FILTER_SCHEMA = {
         },
         "contains_url": {
             "type": "boolean"
-        }
+        },
+        "lazy_load_members": {
+            "type": "boolean"
+        },
     }
 }
 
@@ -261,6 +264,9 @@ class FilterCollection(object):
     def ephemeral_limit(self):
         return self._room_ephemeral_filter.limit()
 
+    def lazy_load_members(self):
+        return self._room_state_filter.lazy_load_members()
+
     def filter_presence(self, events):
         return self._presence_filter.filter(events)
 
@@ -417,6 +423,9 @@ class Filter(object):
     def limit(self):
         return self.filter_json.get("limit", 10)
 
+    def lazy_load_members(self):
+        return self.filter_json.get("lazy_load_members", False)
+
 
 def _matches_wildcard(actual_value, filter_value):
     if filter_value.endswith("*"):