1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-23 17:02:25 +03:00

Delete UnstableValue and use hardcoded value for m.thread

This commit is contained in:
Germain Souquet
2021-10-14 17:09:00 +01:00
parent 7b89862ed0
commit 9ceeb2d220
2 changed files with 4 additions and 13 deletions

View File

@@ -28,7 +28,6 @@ import {
EventType,
MsgType,
RelationType,
UNSTABLE_ELEMENT_THREAD_RELATION,
} from "../@types/event";
import { Crypto } from "../crypto";
import { deepSortedObjectEntries } from "../utils";
@@ -423,7 +422,7 @@ export class MatrixEvent extends EventEmitter {
*/
public get threadRootId(): string {
const relatesTo = this.getWireContent()?.["m.relates_to"];
if (relatesTo?.rel_type === UNSTABLE_ELEMENT_THREAD_RELATION.name) {
if (relatesTo?.rel_type === RelationType.Thread) {
return relatesTo.event_id;
}
}