Check if contextEvent was found
This commit is contained in:
parent
05d2defa2d
commit
640a3fb9fa
1 changed files with 5 additions and 3 deletions
|
@ -297,9 +297,11 @@ export class Timeline {
|
||||||
let contextEvent = this._getTrackedEvent(id);
|
let contextEvent = this._getTrackedEvent(id);
|
||||||
if (!contextEvent) {
|
if (!contextEvent) {
|
||||||
contextEvent = await this._getEventFromStorage(id) ?? await this._getEventFromHomeserver(id);
|
contextEvent = await this._getEventFromStorage(id) ?? await this._getEventFromHomeserver(id);
|
||||||
// this entry was created from storage/hs, so it's not tracked by remoteEntries
|
if (contextEvent) {
|
||||||
// we track them here so that we can update reply previews later
|
// this entry was created from storage/hs, so it's not tracked by remoteEntries
|
||||||
this._contextEntriesNotInTimeline.set(id, contextEvent);
|
// we track them here so that we can update reply previews later
|
||||||
|
this._contextEntriesNotInTimeline.set(id, contextEvent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (contextEvent) {
|
if (contextEvent) {
|
||||||
contextEvent.setAsContextOf(entry);
|
contextEvent.setAsContextOf(entry);
|
||||||
|
|
Reference in a new issue