Drop incoming messages with a story context and no matching story

This commit is contained in:
Josh Perez 2022-08-04 18:15:53 -04:00 committed by GitHub
parent 276435f035
commit 190db3580d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2383,6 +2383,15 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
findStoryMessage(conversation.id, initialMessage.storyContext),
]);
if (initialMessage.storyContext && !storyQuote) {
log.warn(
`handleDataMessage/${idLog}: Received storyContext message but no matching story. Dropping.`
);
confirm();
return;
}
const withQuoteReference = {
...message.attributes,
...initialMessage,