Drop incoming story messages if stories are turned off
This commit is contained in:
parent
026f574fdb
commit
1d5b361159
1 changed files with 14 additions and 0 deletions
|
@ -1856,6 +1856,12 @@ export default class MessageReceiver
|
||||||
|
|
||||||
const attachments: Array<ProcessedAttachment> = [];
|
const attachments: Array<ProcessedAttachment> = [];
|
||||||
|
|
||||||
|
if (!window.Events.getHasStoriesEnabled()) {
|
||||||
|
log.info('MessageReceiver.handleStoryMessage: dropping', logId);
|
||||||
|
this.removeFromCache(envelope);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (msg.fileAttachment) {
|
if (msg.fileAttachment) {
|
||||||
const attachment = processAttachment(msg.fileAttachment);
|
const attachment = processAttachment(msg.fileAttachment);
|
||||||
attachments.push(attachment);
|
attachments.push(attachment);
|
||||||
|
@ -2582,6 +2588,14 @@ export default class MessageReceiver
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sentMessage.storyMessageRecipients && sentMessage.isRecipientUpdate) {
|
if (sentMessage.storyMessageRecipients && sentMessage.isRecipientUpdate) {
|
||||||
|
if (!window.Events.getHasStoriesEnabled()) {
|
||||||
|
log.info(
|
||||||
|
'MessageReceiver.handleSyncMessage: dropping story recipients update'
|
||||||
|
);
|
||||||
|
this.removeFromCache(envelope);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const ev = new StoryRecipientUpdateEvent(
|
const ev = new StoryRecipientUpdateEvent(
|
||||||
{
|
{
|
||||||
destinationUuid: envelope.destinationUuid.toString(),
|
destinationUuid: envelope.destinationUuid.toString(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue