mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 09:16:06 -04:00
Add unit tests
This commit is contained in:
parent
233b14ebe1
commit
e7943f660a
2 changed files with 52 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue