diff --git a/src/matrix/room/timeline/entries/EventEntry.js b/src/matrix/room/timeline/entries/EventEntry.js index 4d19cf56..bdabfea4 100644 --- a/src/matrix/room/timeline/entries/EventEntry.js +++ b/src/matrix/room/timeline/entries/EventEntry.js @@ -146,7 +146,7 @@ export class EventEntry extends BaseEventEntry { return getRelatedEventId(this.event); } - // similar to relatedEventID but excludes relations like redaction + // similar to relatedEventID but only for replies get contextEventId() { if (this.isReply) { return this.relatedEventId; diff --git a/src/matrix/room/timeline/entries/NonPersistedEventEntry.js b/src/matrix/room/timeline/entries/NonPersistedEventEntry.js index f3bae9d2..8ec9f72e 100644 --- a/src/matrix/room/timeline/entries/NonPersistedEventEntry.js +++ b/src/matrix/room/timeline/entries/NonPersistedEventEntry.js @@ -17,6 +17,8 @@ limitations under the License. import {EventEntry} from "./EventEntry.js"; // EventEntry but without the two properties that are populated via SyncWriter +// Useful if you want to create an EventEntry that is ephemeral + export class NonPersistedEventEntry extends EventEntry { get fragmentId() { throw new Error("Cannot access fragmentId for non-persisted EventEntry");