mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Allow specific users to use timestamp massaging without being appservices
This commit is contained in:
parent
e48d921119
commit
0583a5967b
@ -362,6 +362,7 @@ class RoomSendEventRestServlet(TransactionRestServlet):
|
||||
self.delayed_events_handler = hs.get_delayed_events_handler()
|
||||
self.auth = hs.get_auth()
|
||||
self._max_event_delay_ms = hs.config.server.max_event_delay_ms
|
||||
self.hs = hs
|
||||
|
||||
def register(self, http_server: HttpServer) -> None:
|
||||
# /rooms/$roomid/send/$event_type[/$txn_id]
|
||||
@ -379,7 +380,10 @@ class RoomSendEventRestServlet(TransactionRestServlet):
|
||||
content = parse_json_object_from_request(request)
|
||||
|
||||
origin_server_ts = None
|
||||
if requester.app_service:
|
||||
if (
|
||||
requester.app_service
|
||||
or requester.user.to_string() in self.hs.config.meow.timestamp_override
|
||||
):
|
||||
origin_server_ts = parse_integer(request, "ts")
|
||||
|
||||
delay = _parse_request_delay(request, self._max_event_delay_ms)
|
||||
|
Loading…
Reference in New Issue
Block a user