|
|
|
@ -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(
|
|
|
|
|