Stories: Proper notifications and handling of out-of-order messages

This commit is contained in:
Scott Nonnenberg 2023-01-11 14:54:06 -08:00 committed by GitHub
parent 81fc9ff94d
commit 50a0110192
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 425 additions and 274 deletions

View file

@ -5,6 +5,7 @@ import type { MessageAttributesType } from '../model-types.d';
import { deletePackReference } from '../types/Stickers';
import { isStory } from '../messages/helpers';
import { isDirectConversation } from './whatTypeOfConversation';
import { drop } from './drop';
export async function cleanupMessage(
message: MessageAttributesType
@ -78,7 +79,7 @@ async function cleanupStoryReplies(
replies.forEach(reply => {
const model = window.MessageController.register(reply.id, reply);
model.unset('storyReplyContext');
void model.hydrateStoryContext(null);
drop(model.hydrateStoryContext());
});
}