Use explicit allowlist setting for story receive

This commit is contained in:
Josh Perez
2022-11-02 16:56:17 -04:00
committed by GitHub
parent 9fba33943a
commit 64fa3aac59

View File

@@ -116,7 +116,6 @@ import { areArraysMatchingSets } from '../util/areArraysMatchingSets';
import { generateBlurHash } from '../util/generateBlurHash';
import { TEXT_ATTACHMENT } from '../types/MIME';
import type { SendTypesType } from '../util/handleMessageSend';
import { isConversationAccepted } from '../util/isConversationAccepted';
import { getStoriesBlocked } from '../util/stories';
const GROUPV1_ID_LENGTH = 16;
@@ -1405,10 +1404,12 @@ export default class MessageReceiver
envelope.sourceUuid || envelope.source
);
if (
(!sender || !isConversationAccepted(sender.attributes)) &&
(!sender || !sender.get('profileSharing')) &&
(isStoryReply || isStory)
) {
log.warn(`${logId}: Dropping story message - !accepted for sender`);
log.warn(
`${logId}: Dropping story message - !profileSharing for sender`
);
this.removeFromCache(envelope);
return { plaintext: undefined, envelope };
}