Drop incoming messages with a story context and no matching story
This commit is contained in:
parent
276435f035
commit
190db3580d
1 changed files with 9 additions and 0 deletions
|
@ -2383,6 +2383,15 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
||||||
findStoryMessage(conversation.id, initialMessage.storyContext),
|
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 = {
|
const withQuoteReference = {
|
||||||
...message.attributes,
|
...message.attributes,
|
||||||
...initialMessage,
|
...initialMessage,
|
||||||
|
|
Loading…
Reference in a new issue