do not filter by existing conversation when syncing blocked ids

pull/1277/head
Audric Ackermann 5 years ago
parent 38724d0992
commit 4fe0705f3f
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -460,19 +460,14 @@ MessageSender.prototype = {
if (!primaryDeviceKey) {
return Promise.resolve();
}
const convos = window.getConversations().models;
const conversations = Array.isArray(convos) ? convos : [convos];
const currentlyBlockedNumbers = window.BlockedNumberController.getBlockedNumbers();
const blockedConvos = conversations.filter(
c => c.isPrivate() && currentlyBlockedNumbers.includes(c.id)
);
// currently we only sync user blocked, not groups
const blockedSyncMessage = new libsession.Messages.Outgoing.BlockedListSyncMessage(
{
timestamp: Date.now(),
numbers: blockedConvos.map(n => n.id),
numbers: currentlyBlockedNumbers,
groups: [],
}
);

Loading…
Cancel
Save