Skip to content

Commit 0cae60e

Browse files
committed
Move fields into consistent location for js-sdk to target
1 parent d9a0a0b commit 0cae60e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/sendTimePerformanceMetrics.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,10 @@ export function decorateStartSendingTime(content: object) {
3737
export function sendRoundTripMetric(client: MatrixClient, inRoomId: string, forEventId: string) {
3838
// noinspection JSIgnoredPromiseFromCall
3939
client.sendEvent(inRoomId, 'io.element.performance_metric', {
40-
// XXX: We stick all of this into `m.relates_to` so it doesn't end up encrypted.
41-
"m.relates_to": {
42-
rel_type: "io.element.metric",
43-
event_id: forEventId,
40+
"io.element.performance_metrics": {
41+
forEventId: forEventId,
4442
responseTs: Date.now(),
4543
kind: 'send_time',
46-
} as any, // override types because we're actually allowed to add extra metadata to relates_to
44+
},
4745
});
4846
}

0 commit comments

Comments
 (0)