mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:56:02 -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
|
@ -144,6 +144,9 @@ class SyncRestServlet(RestServlet):
|
|||
)
|
||||
|
||||
response_content = {
|
||||
"account_data": self.encode_account_data(
|
||||
sync_result.account_data, filter, time_now
|
||||
),
|
||||
"presence": self.encode_presence(
|
||||
sync_result.presence, filter, time_now
|
||||
),
|
||||
|
@ -165,6 +168,9 @@ class SyncRestServlet(RestServlet):
|
|||
formatted.append(event)
|
||||
return {"events": filter.filter_presence(formatted)}
|
||||
|
||||
def encode_account_data(self, events, filter, time_now):
|
||||
return {"events": filter.filter_account_data(events)}
|
||||
|
||||
def encode_joined(self, rooms, filter, time_now, token_id):
|
||||
"""
|
||||
Encode the joined rooms in a sync result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue