0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-15 21:03:51 +01:00

Docstring

This commit is contained in:
Erik Johnston 2015-10-20 15:47:42 +01:00
parent 45cd2b0233
commit 87deec824a

View file

@ -178,6 +178,11 @@ class Filter(object):
self.filter_json = filter_json self.filter_json = filter_json
def check(self, event): def check(self, event):
"""Checks whether the filter matches the given event.
Returns:
bool: True if the event matches
"""
literal_keys = { literal_keys = {
"rooms": lambda v: event.room_id == v, "rooms": lambda v: event.room_id == v,
"senders": lambda v: event.sender == v, "senders": lambda v: event.sender == v,