Ensure messageCache is updated when properties are unset
Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com>
This commit is contained in:
@@ -382,7 +382,7 @@ const setReactions = (
|
|||||||
if (reactions.length) {
|
if (reactions.length) {
|
||||||
message.set('reactions', reactions);
|
message.set('reactions', reactions);
|
||||||
} else {
|
} else {
|
||||||
message.unset('reactions');
|
message.set('reactions', undefined);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -491,7 +491,7 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this.get('storyReplyContext')) {
|
if (this.get('storyReplyContext')) {
|
||||||
this.unset('storyReplyContext');
|
this.set('storyReplyContext', undefined);
|
||||||
}
|
}
|
||||||
await this.hydrateStoryContext(message.attributes, { shouldSave: true });
|
await this.hydrateStoryContext(message.attributes, { shouldSave: true });
|
||||||
return;
|
return;
|
||||||
|
@@ -89,7 +89,7 @@ async function cleanupStoryReplies(
|
|||||||
reply,
|
reply,
|
||||||
'cleanupStoryReplies/1:1'
|
'cleanupStoryReplies/1:1'
|
||||||
);
|
);
|
||||||
model.unset('storyReplyContext');
|
model.set('storyReplyContext', undefined);
|
||||||
await model.hydrateStoryContext(story, { shouldSave: true });
|
await model.hydrateStoryContext(story, { shouldSave: true });
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user