mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-07-25 01:55:15 -04:00
Add API for setting account_data globaly or on a per room basis
This commit is contained in:
parent
6e70979973
commit
95f30ecd1f
11 changed files with 476 additions and 25 deletions
|
@ -50,7 +50,7 @@ class Filtering(object):
|
|||
# many definitions.
|
||||
|
||||
top_level_definitions = [
|
||||
"presence"
|
||||
"presence", "account_data"
|
||||
]
|
||||
|
||||
room_level_definitions = [
|
||||
|
@ -139,6 +139,10 @@ class FilterCollection(object):
|
|||
self.filter_json.get("presence", {})
|
||||
)
|
||||
|
||||
self.account_data = Filter(
|
||||
self.filter_json.get("account_data", {})
|
||||
)
|
||||
|
||||
def timeline_limit(self):
|
||||
return self.room_timeline_filter.limit()
|
||||
|
||||
|
@ -151,6 +155,9 @@ class FilterCollection(object):
|
|||
def filter_presence(self, events):
|
||||
return self.presence_filter.filter(events)
|
||||
|
||||
def filter_account_data(self, events):
|
||||
return self.account_data.filter(events)
|
||||
|
||||
def filter_room_state(self, events):
|
||||
return self.room_state_filter.filter(events)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue