adding feature flag for config message receiving

This commit is contained in:
warrickct 2021-11-16 14:40:52 +11:00
parent 2eab74246b
commit 40396224dc
2 changed files with 9 additions and 6 deletions

View file

@ -124,12 +124,15 @@ const handleContactReceived = async (
};
// updateProfile will do a commit for us
contactConvo.set('active_at', _.toNumber(envelope.timestamp));
contactConvo.setIsApproved(Boolean(contactReceived.isApproved));
if (contactReceived.isBlocked === true) {
await BlockedNumberController.block(contactConvo.id);
} else {
await BlockedNumberController.unblock(contactConvo.id);
if (window.lokiFeatureFlags.useMessageRequests === true) {
contactConvo.setIsApproved(Boolean(contactReceived.isApproved));
if (contactReceived.isBlocked === true) {
await BlockedNumberController.block(contactConvo.id);
} else {
await BlockedNumberController.unblock(contactConvo.id);
}
}
await updateProfileOneAtATime(contactConvo, profile, contactReceived.profileKey);

View file

@ -311,7 +311,7 @@ async function handleRegularMessage(
updateReadStatus(message, conversation);
}
if (type === 'outgoing') {
if (type === 'outgoing' && window.lokiFeatureFlags.useMessageRequests) {
handleSyncedReceipts(message, conversation);
// assumes sync receipts are always from linked device outgoings?