mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-15 10:05:39 -04:00
Hack together a query param for batch sending non-historical events
This commit is contained in:
parent
4d95e65860
commit
84d583f267
4 changed files with 70 additions and 18 deletions
|
@ -82,6 +82,7 @@ class ReplicationSendEventRestServlet(ReplicationEndpoint):
|
|||
requester: Requester,
|
||||
ratelimit: bool,
|
||||
extra_users: List[UserID],
|
||||
dont_notify: bool,
|
||||
) -> JsonDict:
|
||||
"""
|
||||
Args:
|
||||
|
@ -92,6 +93,7 @@ class ReplicationSendEventRestServlet(ReplicationEndpoint):
|
|||
context
|
||||
ratelimit
|
||||
extra_users: Any extra users to notify about event
|
||||
dont_notify
|
||||
"""
|
||||
serialized_context = await context.serialize(event, store)
|
||||
|
||||
|
@ -106,6 +108,7 @@ class ReplicationSendEventRestServlet(ReplicationEndpoint):
|
|||
"requester": requester.serialize(),
|
||||
"ratelimit": ratelimit,
|
||||
"extra_users": [u.to_string() for u in extra_users],
|
||||
"dont_notify": dont_notify,
|
||||
}
|
||||
|
||||
return payload
|
||||
|
@ -131,13 +134,14 @@ class ReplicationSendEventRestServlet(ReplicationEndpoint):
|
|||
|
||||
ratelimit = content["ratelimit"]
|
||||
extra_users = [UserID.from_string(u) for u in content["extra_users"]]
|
||||
dont_notify = content["dont_notify"]
|
||||
|
||||
logger.info(
|
||||
"Got event to send with ID: %s into room: %s", event.event_id, event.room_id
|
||||
)
|
||||
|
||||
event = await self.event_creation_handler.persist_and_notify_client_event(
|
||||
requester, event, context, ratelimit=ratelimit, extra_users=extra_users
|
||||
requester, event, context, ratelimit=ratelimit, extra_users=extra_users, dont_notify=dont_notify,
|
||||
)
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue