mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
Fixing up block all logic.
This commit is contained in:
parent
ac8dbb341b
commit
3602b51986
|
@ -291,12 +291,13 @@ export class LeftPaneMessageSection extends React.Component<Props, State> {
|
|||
return;
|
||||
}
|
||||
|
||||
_.forEach(conversationRequests, async convo => {
|
||||
if (convo.isApproved !== true) {
|
||||
await Promise.all(
|
||||
conversationRequests.map(async convo => {
|
||||
await BlockedNumberController.block(convo.id);
|
||||
syncRequired = true;
|
||||
}
|
||||
});
|
||||
})
|
||||
);
|
||||
|
||||
if (syncRequired) {
|
||||
await forceSyncConfigurationNowIfNeeded();
|
||||
}
|
||||
|
|
|
@ -127,10 +127,11 @@ const handleContactReceived = async (
|
|||
|
||||
if (
|
||||
window.lokiFeatureFlags.useMessageRequests === true &&
|
||||
window.inboxStore?.getState().userConfig.messageRequests &&
|
||||
contactReceived.isApproved === true
|
||||
window.inboxStore?.getState().userConfig.messageRequests
|
||||
) {
|
||||
await contactConvo.setIsApproved(Boolean(contactReceived.isApproved));
|
||||
if (contactReceived.isApproved === true) {
|
||||
await contactConvo.setIsApproved(Boolean(contactReceived.isApproved));
|
||||
}
|
||||
|
||||
if (contactReceived.isBlocked === true) {
|
||||
await BlockedNumberController.block(contactConvo.id);
|
||||
|
|
Loading…
Reference in a new issue