@@ -300,13 +300,38 @@ An example request would be:
300
300
301
301
#### Timestamp massaging
302
302
303
- Previous drafts of the Application Service API permitted application
304
- services to alter the timestamp of their sent events by providing a ` ts `
305
- query parameter when sending an event. This API has been excluded from
306
- the first release due to design concerns, however some servers may still
307
- support the feature. Please visit [ issue
308
- \# 1585] ( https://github.com/matrix-org/matrix-doc/issues/1585 ) for more
309
- information.
303
+ {{% added-in v="1.3" %}}
304
+
305
+ Application services can alter the timestamp associated with an event, allowing
306
+ the application service to better represent the "real" time an event was sent
307
+ at. While this doesn't affect the server-side ordering of the event, it can allow
308
+ an application service to better represent when an event would have been sent/received
309
+ at, such as in the case of bridges where the remote network might have a slight
310
+ delay and the application service wishes to bridge the proper time onto the message.
311
+
312
+ When authenticating requests as an application service, the caller can append a ` ts `
313
+ query string argument to change the ` origin_server_ts ` of the resulting event. Attempting
314
+ to set the timestamp to anything other than what is accepted by ` origin_server_ts ` should
315
+ be rejected by the server as a bad request.
316
+
317
+ When not present, the server's behaviour is unchanged: the local system time of the server
318
+ will be used to provide a timestamp, representing "now".
319
+
320
+ The ` ts ` query string argument is only valid on the following endpoints:
321
+
322
+ * [ ` PUT /rooms/{roomId}/send/{eventType}/{txnId} ` ] ( /client-server-api/#put_matrixclientv3roomsroomidsendeventtypetxnid )
323
+ * [ ` PUT /rooms/{roomId}/state/{eventType}/{stateKey} ` ] ( /client-server-api/#put_matrixclientv3roomsroomidstateeventtypestatekey )
324
+
325
+ Other endpoints, such as ` /kick ` , do not support ` ts ` : instead, callers can use the
326
+ ` PUT /state ` endpoint to mimic the behaviour of the other APIs.
327
+
328
+ {{% boxes/warning %}}
329
+ Changing the time of an event does not change the server-side (DAG) ordering for the
330
+ event. The event will still be appended at the tip of the DAG as though the timestamp
331
+ was set to "now". Future MSCs, like [ MSC2716] ( https://github.com/matrix-org/matrix-spec-proposals/pull/2716 ) ,
332
+ are expected to provide functionality which can allow DAG order manipulation (for history
333
+ imports and similar behaviour).
334
+ {{% /boxes/warning %}}
310
335
311
336
#### Server admin style permissions
312
337
0 commit comments