mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 18:25:49 +03:00
Move fields into consistent location for js-sdk to target
This commit is contained in:
parent
21e33362e5
commit
70e28e7e13
1 changed files with 3 additions and 5 deletions
|
@ -37,12 +37,10 @@ export function decorateStartSendingTime(content: object) {
|
||||||
export function sendRoundTripMetric(client: MatrixClient, inRoomId: string, forEventId: string) {
|
export function sendRoundTripMetric(client: MatrixClient, inRoomId: string, forEventId: string) {
|
||||||
// noinspection JSIgnoredPromiseFromCall
|
// noinspection JSIgnoredPromiseFromCall
|
||||||
client.sendEvent(inRoomId, 'io.element.performance_metric', {
|
client.sendEvent(inRoomId, 'io.element.performance_metric', {
|
||||||
// XXX: We stick all of this into `m.relates_to` so it doesn't end up encrypted.
|
"io.element.performance_metrics": {
|
||||||
"m.relates_to": {
|
forEventId: forEventId,
|
||||||
rel_type: "io.element.metric",
|
|
||||||
event_id: forEventId,
|
|
||||||
responseTs: Date.now(),
|
responseTs: Date.now(),
|
||||||
kind: 'send_time',
|
kind: 'send_time',
|
||||||
} as any, // override types because we're actually allowed to add extra metadata to relates_to
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue