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
3108b67232
commit
de89885d15
@ -337,6 +337,7 @@ class RoomSendEventRestServlet(TransactionRestServlet):
|
||||
super().__init__(hs)
|
||||
self.event_creation_handler = hs.get_event_creation_handler()
|
||||
self.auth = hs.get_auth()
|
||||
self.hs = hs
|
||||
|
||||
def register(self, http_server: HttpServer) -> None:
|
||||
# /rooms/$roomid/send/$event_type[/$txn_id]
|
||||
@ -360,7 +361,10 @@ class RoomSendEventRestServlet(TransactionRestServlet):
|
||||
"sender": requester.user.to_string(),
|
||||
}
|
||||
|
||||
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")
|
||||
if origin_server_ts is not None:
|
||||
event_dict["origin_server_ts"] = origin_server_ts
|
||||
|
Loading…
Reference in New Issue
Block a user