mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
Check if contextEvent was found
This commit is contained in:
parent
05d2defa2d
commit
640a3fb9fa
@ -297,10 +297,12 @@ 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);
|
||||||
|
if (contextEvent) {
|
||||||
// this entry was created from storage/hs, so it's not tracked by remoteEntries
|
// this entry was created from storage/hs, so it's not tracked by remoteEntries
|
||||||
// we track them here so that we can update reply previews later
|
// we track them here so that we can update reply previews later
|
||||||
this._contextEntriesNotInTimeline.set(id, contextEvent);
|
this._contextEntriesNotInTimeline.set(id, contextEvent);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (contextEvent) {
|
if (contextEvent) {
|
||||||
contextEvent.setAsContextOf(entry);
|
contextEvent.setAsContextOf(entry);
|
||||||
entry.setContextEntry(contextEvent);
|
entry.setContextEntry(contextEvent);
|
||||||
|
Loading…
Reference in New Issue
Block a user