Fix duplicate timeline items for group call events
This commit is contained in:
@@ -2097,9 +2097,12 @@ export class ConversationModel extends window.Backbone.Model<
|
|||||||
eraId: string,
|
eraId: string,
|
||||||
creatorUuid: string
|
creatorUuid: string
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
|
// We want to update the cache quickly in case this function is called multiple times.
|
||||||
|
const oldCachedEraId = this.cachedLatestGroupCallEraId;
|
||||||
|
this.cachedLatestGroupCallEraId = eraId;
|
||||||
|
|
||||||
const alreadyHasMessage =
|
const alreadyHasMessage =
|
||||||
(this.cachedLatestGroupCallEraId &&
|
(oldCachedEraId && oldCachedEraId === eraId) ||
|
||||||
this.cachedLatestGroupCallEraId === eraId) ||
|
|
||||||
(await window.Signal.Data.hasGroupCallHistoryMessage(this.id, eraId));
|
(await window.Signal.Data.hasGroupCallHistoryMessage(this.id, eraId));
|
||||||
|
|
||||||
if (!alreadyHasMessage) {
|
if (!alreadyHasMessage) {
|
||||||
@@ -2110,8 +2113,6 @@ export class ConversationModel extends window.Backbone.Model<
|
|||||||
startedTime: Date.now(),
|
startedTime: Date.now(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.cachedLatestGroupCallEraId = eraId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async addProfileChange(
|
async addProfileChange(
|
||||||
|
Reference in New Issue
Block a user