trigger afr to all users devices if needed on contactSync\

pull/1137/head
Audric Ackermann 5 years ago
parent a857406728
commit 93581874b8
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -1816,12 +1816,21 @@
await conversation.setSecondaryStatus(true, ourPrimaryKey);
}
if (conversation.isFriendRequestStatusNoneOrExpired()) {
libloki.api.sendAutoFriendRequestMessage(conversation.id);
} else {
// Accept any pending friend requests if there are any
conversation.onAcceptFriendRequest({ blockSync: true });
}
const otherDevices = await libloki.storage.getPairedDevicesFor(id);
const devices = [id, ...otherDevices];
const deviceConversations = await Promise.all(devices.map(d => ConversationController.getOrCreateAndWait(
d,
'private'
)));
deviceConversations.forEach(device => {
if (device.isFriendRequestStatusNoneOrExpired()) {
libloki.api.sendAutoFriendRequestMessage(device.id);
} else {
// Accept any pending friend requests if there are any
device.onAcceptFriendRequest({ blockSync: true });
}
});
if (details.profileKey) {
const profileKey = window.Signal.Crypto.arrayBufferToBase64(

Loading…
Cancel
Save