summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-10-30 16:15:04 +0000
committerBrendan Abolivier <babolivier@matrix.org>2019-10-30 16:15:04 +0000
commite7943f660add8b602ea5225060bd0d74e6440017 (patch)
treeb6f85567bc2a4b89ea046fb1d1207bd0516b66f6 /synapse
parentAdd index on label (diff)
downloadsynapse-e7943f660add8b602ea5225060bd0d74e6440017.tar.xz
Add unit tests
Diffstat (limited to 'synapse')
-rw-r--r--synapse/api/filtering.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/api/filtering.py b/synapse/api/filtering.py
index a27029c678..bd91b9f018 100644
--- a/synapse/api/filtering.py
+++ b/synapse/api/filtering.py
@@ -307,7 +307,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(LabelsField)
+            labels = content.get(LabelsField, [])
 
         return self.check_fields(room_id, sender, ev_type, labels, contains_url)