You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-05 17:02:07 +03:00
Add getRelation helper
This adds a `getRelation` helper to ensure we always read relation info from the wire content as required in E2E rooms.
This commit is contained in:
@@ -1034,7 +1034,7 @@ Room.prototype._addLiveEvent = function(event, duplicateStrategy) {
|
||||
|
||||
|
||||
if (this._opts.unstableClientRelationReplacements && event.isRelation("m.replace")) {
|
||||
const relatesTo = event.getContent()["m.relates_to"];
|
||||
const relatesTo = event.getRelation();
|
||||
const replacedId = relatesTo && relatesTo.event_id;
|
||||
const replacedEvent = this.getUnfilteredTimelineSet().findEventById(replacedId);
|
||||
if (replacedEvent) {
|
||||
|
||||
Reference in New Issue
Block a user