Ensure messageCache is updated when properties are unset
This commit is contained in:
parent
6906e39c87
commit
ce276b56c2
3 changed files with 3 additions and 3 deletions
|
@ -382,7 +382,7 @@ const setReactions = (
|
|||
if (reactions.length) {
|
||||
message.set('reactions', reactions);
|
||||
} else {
|
||||
message.unset('reactions');
|
||||
message.set('reactions', undefined);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -491,7 +491,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
}
|
||||
|
||||
if (this.get('storyReplyContext')) {
|
||||
this.unset('storyReplyContext');
|
||||
this.set('storyReplyContext', undefined);
|
||||
}
|
||||
await this.hydrateStoryContext(message.attributes, { shouldSave: true });
|
||||
return;
|
||||
|
|
|
@ -89,7 +89,7 @@ async function cleanupStoryReplies(
|
|||
reply,
|
||||
'cleanupStoryReplies/1:1'
|
||||
);
|
||||
model.unset('storyReplyContext');
|
||||
model.set('storyReplyContext', undefined);
|
||||
await model.hydrateStoryContext(story, { shouldSave: true });
|
||||
})
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue