diff options
author | Erik Johnston <erik@matrix.org> | 2015-10-20 15:47:42 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-10-20 15:47:42 +0100 |
commit | 87deec824a6a7b90d463b1e09ad799f5e8e2586c (patch) | |
tree | c6a15fc8843f99a9f9ce0e47ab2b4254f5d285e4 /synapse | |
parent | Refactor api.filtering to have a Filter API (diff) | |
download | synapse-87deec824a6a7b90d463b1e09ad799f5e8e2586c.tar.xz |
Docstring
Diffstat (limited to 'synapse')
-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, |