mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-09-18 02:34:35 -04:00
Merge remote-tracking branch 'upstream/release-v1.75'
This commit is contained in:
commit
2830d33724
148 changed files with 4230 additions and 2236 deletions
|
@ -351,13 +351,13 @@ class Filter:
|
|||
self.not_rel_types = filter_json.get("org.matrix.msc3874.not_rel_types", [])
|
||||
|
||||
def filters_all_types(self) -> bool:
|
||||
return "*" in self.not_types
|
||||
return self.types == [] or "*" in self.not_types
|
||||
|
||||
def filters_all_senders(self) -> bool:
|
||||
return "*" in self.not_senders
|
||||
return self.senders == [] or "*" in self.not_senders
|
||||
|
||||
def filters_all_rooms(self) -> bool:
|
||||
return "*" in self.not_rooms
|
||||
return self.rooms == [] or "*" in self.not_rooms
|
||||
|
||||
def _check(self, event: FilterEvent) -> bool:
|
||||
"""Checks whether the filter matches the given event.
|
||||
|
@ -450,8 +450,8 @@ class Filter:
|
|||
if any(map(match_func, disallowed_values)):
|
||||
return False
|
||||
|
||||
# Other the event does not match at least one of the allowed values,
|
||||
# reject it.
|
||||
# Otherwise if the event does not match at least one of the allowed
|
||||
# values, reject it.
|
||||
allowed_values = getattr(self, name)
|
||||
if allowed_values is not None:
|
||||
if not any(map(match_func, allowed_values)):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue