summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-11-01 16:22:44 +0000
committerBrendan Abolivier <babolivier@matrix.org>2019-11-01 16:22:44 +0000
commit988d8d6507a0e8b34f2c352c77b5742197762190 (patch)
treeba0af87157b204a3866e1029112d9096bf7ba250 /synapse/api
parentUpdate synapse/storage/data_stores/main/schema/delta/56/event_labels.sql (diff)
downloadsynapse-988d8d6507a0e8b34f2c352c77b5742197762190.tar.xz
Incorporate review
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/constants.py2
-rw-r--r--synapse/api/filtering.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/synapse/api/constants.py b/synapse/api/constants.py
index 066ce18704..49c4b85054 100644
--- a/synapse/api/constants.py
+++ b/synapse/api/constants.py
@@ -144,4 +144,4 @@ class EventContentFields(object):
     """Fields found in events' content, regardless of type."""
 
     # Labels for the event, cf https://github.com/matrix-org/matrix-doc/pull/2326
-    Labels = "org.matrix.labels"
+    LABELS = "org.matrix.labels"
diff --git a/synapse/api/filtering.py b/synapse/api/filtering.py
index 30a7ee0a7a..bec13f08d8 100644
--- a/synapse/api/filtering.py
+++ b/synapse/api/filtering.py
@@ -309,7 +309,7 @@ class Filter(object):
             content = event.get("content", {})
             # check if there is a string url field in the content for filtering purposes
             contains_url = isinstance(content.get("url"), text_type)
-            labels = content.get(EventContentFields.Labels, [])
+            labels = content.get(EventContentFields.LABELS, [])
 
         return self.check_fields(room_id, sender, ev_type, labels, contains_url)