diff --git a/ts/jobs/helpers/sendReaction.ts b/ts/jobs/helpers/sendReaction.ts index 7a21d185f7..d95e002ec5 100644 --- a/ts/jobs/helpers/sendReaction.ts +++ b/ts/jobs/helpers/sendReaction.ts @@ -382,7 +382,7 @@ const setReactions = ( if (reactions.length) { message.set('reactions', reactions); } else { - message.unset('reactions'); + message.set('reactions', undefined); } }; diff --git a/ts/models/messages.ts b/ts/models/messages.ts index 8c82ebea8f..6789e2574e 100644 --- a/ts/models/messages.ts +++ b/ts/models/messages.ts @@ -491,7 +491,7 @@ export class MessageModel extends window.Backbone.Model { } if (this.get('storyReplyContext')) { - this.unset('storyReplyContext'); + this.set('storyReplyContext', undefined); } await this.hydrateStoryContext(message.attributes, { shouldSave: true }); return; diff --git a/ts/util/cleanup.ts b/ts/util/cleanup.ts index ef4f5d188c..0fb5cf09fa 100644 --- a/ts/util/cleanup.ts +++ b/ts/util/cleanup.ts @@ -89,7 +89,7 @@ async function cleanupStoryReplies( reply, 'cleanupStoryReplies/1:1' ); - model.unset('storyReplyContext'); + model.set('storyReplyContext', undefined); await model.hydrateStoryContext(story, { shouldSave: true }); }) );