New getRecentStoryReplies function to clean up replies in multiple convos
This commit is contained in:
parent
ca84d637ae
commit
716f852970
11 changed files with 356 additions and 63 deletions
|
@ -1395,7 +1395,7 @@ export class ConversationModel extends window.Backbone
|
|||
}
|
||||
|
||||
private async beforeAddSingleMessage(message: MessageModel): Promise<void> {
|
||||
await message.hydrateStoryContext();
|
||||
await message.hydrateStoryContext(undefined, { shouldSave: true });
|
||||
|
||||
if (!this.newMessageQueue) {
|
||||
this.newMessageQueue = new PQueue({
|
||||
|
@ -1778,7 +1778,11 @@ export class ConversationModel extends window.Backbone
|
|||
log.warn(`cleanModels: Upgraded schema of ${upgraded} messages`);
|
||||
}
|
||||
|
||||
await Promise.all(result.map(model => model.hydrateStoryContext()));
|
||||
await Promise.all(
|
||||
result.map(model =>
|
||||
model.hydrateStoryContext(undefined, { shouldSave: true })
|
||||
)
|
||||
);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue