diff options
-rw-r--r-- | synapse/api/filtering.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/api/filtering.py b/synapse/api/filtering.py index cd7a465e97..60b6648e0d 100644 --- a/synapse/api/filtering.py +++ b/synapse/api/filtering.py @@ -178,6 +178,11 @@ class Filter(object): self.filter_json = filter_json def check(self, event): + """Checks whether the filter matches the given event. + + Returns: + bool: True if the event matches + """ literal_keys = { "rooms": lambda v: event.room_id == v, "senders": lambda v: event.sender == v, |