adding feature flag for config message receiving

pull/2000/head
warrickct 3 years ago
parent 2eab74246b
commit 40396224dc

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

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

Loading…
Cancel
Save