Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Scratch changes for matrix-public-archive #653

Draft
wants to merge 71 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 65 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
dcc508c
Changes added to work on the Matrix public archive
MadLittleMods Feb 2, 2022
5805ce0
Remove some scratch changes
MadLittleMods Feb 2, 2022
eda179a
Remove dom side-effect from rendering
MadLittleMods Feb 4, 2022
4eb24db
Fix reply tiles not showing the new message
MadLittleMods Feb 9, 2022
8d0c4e6
Some changes to support RoomView with no composer
MadLittleMods Feb 10, 2022
e75f18c
Support custom RightPanel content
MadLittleMods Feb 10, 2022
48825ea
Use explicit HTML document boilerplate to get consistent results in b…
MadLittleMods Feb 12, 2022
1032f4d
Merge branch 'master' into madlittlemods/matrix-public-archive-scratc…
MadLittleMods Feb 14, 2022
6005fcf
Add permalink to timestamp
MadLittleMods Feb 24, 2022
a4cdde6
Use UTC timestamps and add data attribute for easy targeting in tests
MadLittleMods Feb 24, 2022
3e58619
Add more SVG elements
MadLittleMods Feb 24, 2022
fc89bfd
Get rid of duplicate export
MadLittleMods Feb 24, 2022
082d997
Only try to use window.crypto.subtle in secure contexts to avoid it t…
MadLittleMods Feb 24, 2022
ea2d45c
No need to comment this out since linkedom supports it now
MadLittleMods Feb 25, 2022
c24ac43
Merge branch 'master' into madlittlemods/matrix-public-archive-scratc…
MadLittleMods Jun 6, 2022
ae67386
Use correct variable in comment
MadLittleMods Jun 6, 2022
2d3b78b
WIP: Make the lightbox open, not working yet
MadLittleMods Jun 7, 2022
1a0b140
Working lightbox pops up and closes
MadLittleMods Jun 7, 2022
5d9dc63
URL hashes relative to the room of the archive
MadLittleMods Jun 8, 2022
72300d1
Lightbox escape keyboard shortcut also works
MadLittleMods Jun 8, 2022
6a6f220
Merge branch 'master' into madlittlemods/matrix-public-archive-scratc…
MadLittleMods Jul 5, 2022
8dc3c13
Ignore missing events
MadLittleMods Jul 20, 2022
871cf1a
Revert "Ignore missing events"
MadLittleMods Jul 20, 2022
c824012
`this` doesn't work in strict mode which the SDK is exported as
MadLittleMods Jul 21, 2022
b54e884
Expose error when we fail to createObjectStore
MadLittleMods Jul 21, 2022
88e2470
Scope log
MadLittleMods Jul 22, 2022
acaf53d
More exports
MadLittleMods Jul 22, 2022
7c87e06
WIP: Custom room header
MadLittleMods Aug 30, 2022
c62c047
Merge branch 'master' into madlittlemods/matrix-public-archive-scratc…
MadLittleMods Aug 30, 2022
36f26a0
Try fix no composer
MadLittleMods Aug 30, 2022
bdf820a
Include SDK asset build fix from https://github.com/vector-im/hydroge…
MadLittleMods Aug 30, 2022
eb470fa
Scratch changes for responsive and toggling right-panel via room header
MadLittleMods Aug 30, 2022
f2baf3d
Seems like an unused style that collides with styles in the archive t…
MadLittleMods Aug 30, 2022
fa0e487
Remove custom `none` composer in favor of useful HTML message in the …
MadLittleMods Aug 30, 2022
98e0dd9
Make changes for stubbed PowerLevels
MadLittleMods Aug 31, 2022
921544a
Add header/footer
MadLittleMods Sep 3, 2022
d5ba256
More necessary exports
MadLittleMods Sep 8, 2022
7710580
Add style tag for adding dynamic debugging styles
MadLittleMods Sep 15, 2022
89d044c
Add data-event-id to the AnnouncementView
MadLittleMods Sep 16, 2022
127f39a
Log error caught in boundary to the console
MadLittleMods Sep 16, 2022
fa524d9
Add support for developer-options navigation
MadLittleMods Sep 17, 2022
5ab01b6
Extra style for reference by children
MadLittleMods Sep 20, 2022
de261aa
Be able to access the event room_id
MadLittleMods Sep 20, 2022
e0e4868
Make the summary stick to the bottom
MadLittleMods Sep 20, 2022
4d789bd
Merge branch 'master' into madlittlemods/matrix-public-archive-scratc…
MadLittleMods Oct 14, 2022
c94765e
Add new elements
MadLittleMods Oct 19, 2022
7d4f2b3
Merge branch 'madlittlemods/matrix-public-archive-scratch-changes' of…
MadLittleMods Oct 19, 2022
26cb86e
Add export
MadLittleMods Oct 20, 2022
8911be8
Merge branch 'master' into madlittlemods/matrix-public-archive-scratc…
MadLittleMods Oct 20, 2022
9f5e66e
Add details element
MadLittleMods Oct 21, 2022
1d9c1bf
Add a way to change the anchor position to the top of a node
MadLittleMods Nov 1, 2022
4e3f397
Revert "Add a way to change the anchor position to the top of a node"
MadLittleMods Nov 1, 2022
5fdbe61
Add a way to toggle scrollToBottom so you can start scroll from the t…
MadLittleMods Nov 2, 2022
c9859ff
Add a way to change the anchor position to the top of a node
MadLittleMods Nov 1, 2022
7602825
Re-add way to align scroll top to event
MadLittleMods Nov 3, 2022
dc6ab45
Add a way to highlight tiles
MadLittleMods Nov 3, 2022
ceca3d1
Add a way to scroll to the given highlighted event
MadLittleMods Nov 3, 2022
b84dd3b
Fix tsc error
MadLittleMods Nov 3, 2022
65ec71b
Prevent messages nested in a reply from being highlighted
MadLittleMods Nov 3, 2022
168788d
Add MXID as title tooltip
MadLittleMods Nov 9, 2022
847482f
Add full MXID to message avatar/sender
MadLittleMods Nov 9, 2022
bb51174
Fix AnnouncementView member events not highlighting
MadLittleMods Nov 9, 2022
07cc95c
Add different hover styles so it's more obvious if you page-load with…
MadLittleMods Nov 9, 2022
7c52de3
Merge branch 'master' into madlittlemods/matrix-public-archive-scratc…
MadLittleMods Nov 10, 2022
64b6ba1
Add copy permalink action
MadLittleMods Nov 11, 2022
72837d8
Remove matrix.to link from message timestamp since we have an context…
MadLittleMods Nov 12, 2022
84029d5
Merge branch 'master' into madlittlemods/matrix-public-archive-scratc…
MadLittleMods Apr 26, 2023
987d27a
Increase width to accomodate long dates with year like 'Wednesday, No…
MadLittleMods Apr 26, 2023
ba0eb55
Add ApplyMap to exports
MadLittleMods May 3, 2023
f1ec4d4
Add MXC URL's as data-attribute for easy reference
MadLittleMods May 11, 2023
8034c53
Backport fix to make SDK depedencies available when npm linking
MadLittleMods May 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/domain/ViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ import type {ILogger} from "../logging/types";
import type {Navigation} from "./navigation/Navigation";
import type {SegmentType} from "./navigation/index";
import type {IURLRouter} from "./navigation/URLRouter";
import type {History} from "../platform/web/dom/History";

export type Options<T extends object = SegmentType> = {
platform: Platform;
logger: ILogger;
urlRouter: IURLRouter<T>;
navigation: Navigation<T>;
history: History;
emitChange?: (params: any) => void;
}

Expand Down Expand Up @@ -145,4 +147,8 @@ export class ViewModel<N extends object = SegmentType, O extends Options<N> = Op
// typescript needs a little help here
return this._options.navigation as unknown as Navigation<N>;
}

get history(): History {
return this._options.history;
}
}
8 changes: 5 additions & 3 deletions src/domain/navigation/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export type SegmentType = {
"details": true;
"members": true;
"member": string;
"change-dates": true;
"developer-options": true;
};

export function createNavigation(): Navigation<SegmentType> {
Expand All @@ -56,9 +58,9 @@ function allowsChild(parent: Segment<SegmentType> | undefined, child: Segment<Se
// downside of the approach: both of these will control which tile is selected
return type === "room" || type === "empty-grid-tile";
case "room":
return type === "lightbox" || type === "right-panel";
return type === "lightbox" || type === "right-panel" || type === "developer-options";
case "right-panel":
return type === "details"|| type === "members" || type === "member";
return type === "details"|| type === "members" || type === "member" || type === "change-dates";
case "logout":
return type === "forced";
default:
Expand Down Expand Up @@ -173,7 +175,7 @@ export function parseUrlPath(urlPath: string, currentNavPath: Path<SegmentType>,
if (sessionSegment) {
segments.push(sessionSegment);
}
} else if (type === "details" || type === "members") {
} else if (type === "details" || type === "members" || type === "change-dates") {
pushRightPanelSegment(segments, type);
} else if (type === "member") {
const userId = iterator.next().value;
Expand Down
14 changes: 7 additions & 7 deletions src/domain/session/SessionViewModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {RoomViewModel} from "./room/RoomViewModel.js";
import {UnknownRoomViewModel} from "./room/UnknownRoomViewModel.js";
import {InviteViewModel} from "./room/InviteViewModel.js";
import {RoomBeingCreatedViewModel} from "./room/RoomBeingCreatedViewModel.js";
import {LightboxViewModel} from "./room/LightboxViewModel.js";
import {setupLightboxNavigation} from "./room/lightbox-navigation.js";
import {SessionStatusViewModel} from "./SessionStatusViewModel.js";
import {RoomGridViewModel} from "./RoomGridViewModel.js";
import {SettingsViewModel} from "./settings/SettingsViewModel.js";
Expand Down Expand Up @@ -91,12 +91,12 @@ export class SessionViewModel extends ViewModel {
}));
this._updateJoinRoom(joinRoom.get());

const lightbox = this.navigation.observe("lightbox");
this.track(lightbox.subscribe(eventId => {
this._updateLightbox(eventId);
}));
this._updateLightbox(lightbox.get());

setupLightboxNavigation(this, 'lightboxViewModel', (eventId) => {
return {
room: this._roomFromNavigation(),
eventId,
};
});

const rightpanel = this.navigation.observe("right-panel");
this.track(rightpanel.subscribe(() => this._updateRightPanel()));
Expand Down
19 changes: 12 additions & 7 deletions src/domain/session/room/LightboxViewModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import {ViewModel} from "../../ViewModel";
export class LightboxViewModel extends ViewModel {
constructor(options) {
super(options);
this._eventId = options.eventId;
this._eventEntry = options.eventEntry;
this._eventId = options.eventId || options.eventEntry.id;
this._unencryptedImageUrl = null;
this._decryptedImage = null;
this._closeUrl = this.urlRouter.urlUntilSegment("room");
Expand All @@ -28,11 +29,15 @@ export class LightboxViewModel extends ViewModel {
}

_subscribeToEvent(room, eventId) {
const eventObservable = room.observeEvent(eventId);
this.track(eventObservable.subscribe(eventEntry => {
this._loadEvent(room, eventEntry);
}));
this._loadEvent(room, eventObservable.get());
let event = this._eventEntry;
if (!this._eventEntry) {
const eventObservable = room.observeEvent(eventId);
this.track(eventObservable.subscribe(eventEntry => {
this._loadEvent(room, eventEntry);
}));
event = eventObservable.get();
}
this._loadEvent(room, event);
}

async _loadEvent(room, eventEntry) {
Expand Down Expand Up @@ -91,6 +96,6 @@ export class LightboxViewModel extends ViewModel {
}

close() {
this.platform.history.pushUrl(this.closeUrl);
this.history.pushUrl(this.closeUrl);
}
}
1 change: 1 addition & 0 deletions src/domain/session/room/RoomViewModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export class RoomViewModel extends ViewModel {
this._room.on("change", this._onRoomChange);
try {
const timeline = await this._room.openTimeline();
console.log('timeline', timeline.entries);
this._tileOptions = this.childOptions({
roomVM: this,
timeline,
Expand Down
69 changes: 69 additions & 0 deletions src/domain/session/room/lightbox-navigation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
Copyright 2022 Bruno Windels <bruno@windels.cloud>
Copyright 2022 The Matrix.org Foundation C.I.C.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

import {LightboxViewModel} from "./LightboxViewModel.js";

// Store the `LightboxViewModel` under a symbol so no one else can tamper with
// it. This acts like a private field on the class since no one else has the
// symbol to look it up.
let lightboxViewModelSymbol = Symbol('lightboxViewModel');

/**
* Destroys and creates a new the `LightboxViewModel` depending if
* `lightboxChildOptions.eventEntry` or `lightboxChildOptions.eventId` are
* provided.
*/
function updateLightboxViewModel(vm, fieldName, lightboxChildOptions) {
// Remove any existing `LightboxViewModel` before we assemble the new one below
if (vm[lightboxViewModelSymbol]) {
vm[lightboxViewModelSymbol] = vm.disposeTracked(vm[lightboxViewModelSymbol]);
// Let the `LightboxView` know that the `LightboxViewModel` has changed
vm.emitChange(fieldName);
}
// Create the new `LightboxViewModel` if the `eventEntry` exists directly or
// `eventId` which we can load from the store
if (lightboxChildOptions.eventId || lightboxChildOptions.eventEntry) {
vm[lightboxViewModelSymbol] = vm.track(new LightboxViewModel(vm.childOptions(lightboxChildOptions)));
// Let the `LightboxView` know that the `LightboxViewModel` has changed
vm.emitChange(fieldName);
}
}

/**
* Handles updating the `LightboxViewModel` whenever the page URL changes and
* emits changes which the `LightboxView` will use to re-render. This is a
* composable piece of logic to call in an existing `ViewModel`'s constructor.
*/
export function setupLightboxNavigation(vm, fieldName = 'lightboxViewModel', lightboxChildOptionsFunction) {
// On the given `vm`, create a getter at `fieldName` that the
// `LightboxViewModel` is exposed at for usage in the view.
Object.defineProperty(vm, fieldName, {
get: function() {
return vm[lightboxViewModelSymbol];
}
});

// Whenever the page navigates somewhere, keep the `lightboxViewModel` up to date
const lightbox = vm.navigation.observe("lightbox");
vm.track(lightbox.subscribe(eventId => {
updateLightboxViewModel(vm, fieldName, lightboxChildOptionsFunction(eventId));
}));
// Also handle the case where the URL already includes `/lightbox/$eventId` (like
// from page-load)
const initialLightBoxEventId = lightbox.get();
updateLightboxViewModel(vm, fieldName, lightboxChildOptionsFunction(initialLightBoxEventId));
}
20 changes: 19 additions & 1 deletion src/domain/session/room/timeline/TimelineViewModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ export class TimelineViewModel extends ViewModel {
this._requestedEndTile = null;
this._requestScheduled = false;
this._showJumpDown = false;
this._eventIdHighlighted = null;
}

/** if this.tiles is empty, call this with undefined for both startTile and endTile */
/** if this._tiles is empty, call this with undefined for both startTile and endTile */
setVisibleTileRange(startTile, endTile) {
// don't clear these once done as they are used to check
// for more tiles once loadAtTop finishes
Expand Down Expand Up @@ -96,6 +97,23 @@ export class TimelineViewModel extends ViewModel {
}
}

setEventHighlight(eventId, newHighlightValue) {
const eventEntry = this._timeline.getByEventId(eventId);
if (eventEntry) {
eventEntry.setIsHighlighted(newHighlightValue);

// If a new highlight, emit a change so we can scroll to this new highlight
if (newHighlightValue) {
this._eventIdHighlighted = eventId;
this.emitChange('eventIdHighlighted');
}
}
}

get eventIdHighlighted() {
return this._eventIdHighlighted;
}

get tiles() {
return this._tiles;
}
Expand Down
16 changes: 13 additions & 3 deletions src/domain/session/room/timeline/tiles/BaseMessageTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ limitations under the License.
import {SimpleTile} from "./SimpleTile.js";
import {ReactionsViewModel} from "../ReactionsViewModel.js";
import {getIdentifierColorNumber, avatarInitials, getAvatarHttpUrl} from "../../../../avatar";
import {copyPlaintext} from "../../../../../platform/web/dom/utils";


export class BaseMessageTile extends SimpleTile {
constructor(entry, options) {
Expand Down Expand Up @@ -45,10 +47,18 @@ export class BaseMessageTile extends SimpleTile {
return `https://matrix.to/#/${encodeURIComponent(this._room.id)}/${encodeURIComponent(this._entry.id)}`;
}

copyPermalink() {
copyPlaintext(this.permaLink);
}

get senderProfileLink() {
return `https://matrix.to/#/${encodeURIComponent(this.sender)}`;
}

get eventId() {
return this._entry.id;
}

get displayName() {
return this._entry.displayName || this.sender;
}
Expand Down Expand Up @@ -79,15 +89,15 @@ export class BaseMessageTile extends SimpleTile {
}

get date() {
return this._date && this._date.toLocaleDateString({}, {month: "numeric", day: "numeric"});
return this._date && this._date.toLocaleDateString({}, {month: "numeric", day: "numeric", timeZone: 'UTC'});
}

get time() {
return this._date && this._date.toLocaleTimeString({}, {hour: "numeric", minute: "2-digit"});
return this._date && this._date.toLocaleTimeString({}, {hour: "numeric", minute: "2-digit", timeZone: 'UTC'});
}

get isOwn() {
return this._entry.sender === this._ownMember.userId;
return this._entry.sender === this._ownMember?.userId;
}

get isContinuation() {
Expand Down
4 changes: 4 additions & 0 deletions src/domain/session/room/timeline/tiles/SimpleTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ export class SimpleTile extends ViewModel {
return false;
}

get isHighlighted() {
return this._entry.isHighlighted;
}

get hasDateSeparator() {
return false;
}
Expand Down
17 changes: 17 additions & 0 deletions src/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ export {SessionViewModel} from "./domain/session/SessionViewModel.js";
export {SessionView} from "./platform/web/ui/session/SessionView.js";
export {RoomViewModel} from "./domain/session/room/RoomViewModel.js";
export {RoomView} from "./platform/web/ui/session/room/RoomView.js";
export {LightboxView} from "./platform/web/ui/session/room/LightboxView.js";
export {setupLightboxNavigation} from "./domain/session/room/lightbox-navigation.js";
export {RightPanelView} from "./platform/web/ui/session/rightpanel/RightPanelView.js";
export {MediaRepository} from "./matrix/net/MediaRepository";
export {HomeServerApi} from "./matrix/net/HomeServerApi";
export {Storage} from "./matrix/storage/idb/Storage";
export {StorageFactory} from "./matrix/storage/idb/StorageFactory";
export {TilesCollection} from "./domain/session/room/timeline/TilesCollection.js";
export {FragmentIdComparer} from "./matrix/room/timeline/FragmentIdComparer.js";
export {EventEntry} from "./matrix/room/timeline/entries/EventEntry.js";
export {encodeKey, decodeKey, encodeEventIdKey, decodeEventIdKey} from "./matrix/storage/idb/stores/TimelineEventStore";
export {Timeline} from "./matrix/room/timeline/Timeline.js";
export {TimelineViewModel} from "./domain/session/room/timeline/TimelineViewModel.js";
export {tileClassForEntry} from "./domain/session/room/timeline/tiles/index";
export type {TimelineEntry, TileClassForEntryFn, Options, TileConstructor} from "./domain/session/room/timeline/tiles/index";
Expand Down Expand Up @@ -63,12 +75,17 @@ export {TextMessageView} from "./platform/web/ui/session/room/timeline/TextMessa
export {VideoView} from "./platform/web/ui/session/room/timeline/VideoView.js";

export {Navigation} from "./domain/navigation/Navigation.js";
export {URLRouter} from "./domain/navigation/URLRouter";
export {History} from "./platform/web/dom/History.js";
export {ComposerViewModel} from "./domain/session/room/ComposerViewModel.js";
export {MessageComposer} from "./platform/web/ui/session/room/MessageComposer.js";
export {text, tag} from "./platform/web/ui/general/html";
export {TemplateView} from "./platform/web/ui/general/TemplateView";
export {ListView} from "./platform/web/ui/general/ListView";
export {ViewModel} from "./domain/ViewModel";
export {LoadingView} from "./platform/web/ui/general/LoadingView.js";
export {AvatarView} from "./platform/web/ui/AvatarView.js";
export {avatarInitials, getIdentifierColorNumber} from "./domain/avatar"
export {RoomType} from "./matrix/room/common";
export {EventEmitter} from "./utils/EventEmitter";
export {Disposables} from "./utils/Disposables";
Expand Down
3 changes: 2 additions & 1 deletion src/matrix/room/PowerLevels.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ export class PowerLevels {

/** @param {string} action either "invite", "kick", "ban" or "redact". */
_getActionLevel(action) {
const level = this._plEvent?.content[action];
const level = this._plEvent?.content?.[action];
if (typeof level === "number") {
return level;
} else {
// TODO: Why does this default to 50?
return 50;
}
}
Expand Down
7 changes: 5 additions & 2 deletions src/matrix/room/timeline/Timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export class Timeline {
const readerRequest = this._disposables.track(this._timelineReader.readFromEnd(20, txn, log));
try {
const entries = await readerRequest.complete();
console.log('entries', entries)
this._loadContextEntriesWhereNeeded(entries);
this._setupEntries(entries);
} finally {
Expand Down Expand Up @@ -198,8 +199,10 @@ export class Timeline {
if (!this._localEntries?.hasSubscriptions) {
return;
}
// find any local relations to this new remote event
for (const pee of this._localEntries) {
// find any local relations to these new remote events or maybe these
// new remote events reference one of the other new remote events we have.
const entryList = new ConcatList(entries, this._localEntries);
for (const pee of entryList) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes emoji reactions show up on messages.

(the m.reaction events are in the list of events we're rendering)

Comment on lines +202 to +205
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split off to #860

// this will work because we set relatedEventId when removing remote echos
if (pee.relatedEventId) {
const relationTarget = entries.find(e => e.id === pee.relatedEventId);
Expand Down
13 changes: 13 additions & 0 deletions src/matrix/room/timeline/entries/EventEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export class EventEntry extends BaseEventEntry {
constructor(eventEntry, fragmentIdComparer) {
super(fragmentIdComparer);
this._eventEntry = eventEntry;
this._isHighlighted = false;
this._decryptionError = null;
this._decryptionResult = null;
}
Expand Down Expand Up @@ -77,6 +78,10 @@ export class EventEntry extends BaseEventEntry {
return this._eventEntry.event.sender;
}

get roomId() {
return this._eventEntry.event.room_id;
}

get displayName() {
return this._eventEntry.displayName;
}
Expand All @@ -93,6 +98,14 @@ export class EventEntry extends BaseEventEntry {
return this._eventEntry.event.event_id;
}

get isHighlighted() {
return this._isHighlighted;
}

setIsHighlighted(newValue) {
this._isHighlighted = newValue;
}

setDecryptionResult(result) {
this._decryptionResult = result;
}
Expand Down