diff --git a/src/matrix/room/timeline/entries/EventEntry.js b/src/matrix/room/timeline/entries/EventEntry.js index f98801f9..55219cd6 100644 --- a/src/matrix/room/timeline/entries/EventEntry.js +++ b/src/matrix/room/timeline/entries/EventEntry.js @@ -16,7 +16,7 @@ limitations under the License. import {BaseEventEntry} from "./BaseEventEntry.js"; import {getPrevContentFromStateEvent, isRedacted} from "../../common.js"; -import {getRelatedEventId} from "../relations.js"; +import {getRelationFromContent, getRelatedEventId} from "../relations.js"; export class EventEntry extends BaseEventEntry { constructor(eventEntry, fragmentIdComparer) { @@ -139,6 +139,12 @@ export class EventEntry extends BaseEventEntry { get annotations() { return this._eventEntry.annotations; } + + get relation() { + const originalContent = this._eventEntry.event.content; + const originalRelation = originalContent && getRelationFromContent(originalContent); + return originalRelation || getRelationFromContent(this.content); + } } import {withTextBody, withContent, createEvent} from "../../../../mocks/event.js";