|
|
|
@ -419,13 +419,14 @@ MessageSender.prototype = {
|
|
|
|
|
return Promise.all(syncPromises);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async sendOpenGroupsSyncMessage(conversations) {
|
|
|
|
|
async sendOpenGroupsSyncMessage(convos) {
|
|
|
|
|
// If we havn't got a primaryDeviceKey then we are in the middle of pairing
|
|
|
|
|
// primaryDevicePubKey is set to our own number if we are the master device
|
|
|
|
|
const primaryDeviceKey = window.storage.get('primaryDevicePubKey');
|
|
|
|
|
if (!primaryDeviceKey) {
|
|
|
|
|
return Promise.resolve();
|
|
|
|
|
}
|
|
|
|
|
const conversations = Array.isArray(convos) ? convos : [convos];
|
|
|
|
|
|
|
|
|
|
const openGroupsConvos = await libsession.Utils.SyncMessageUtils.filterOpenGroupsConvos(
|
|
|
|
|
conversations
|
|
|
|
@ -453,9 +454,9 @@ MessageSender.prototype = {
|
|
|
|
|
},
|
|
|
|
|
syncReadMessages(reads) {
|
|
|
|
|
const myDevice = textsecure.storage.user.getDeviceId();
|
|
|
|
|
// FIXME audric currently not in used
|
|
|
|
|
// FIXME currently not in used
|
|
|
|
|
if (myDevice !== 1 && myDevice !== '1') {
|
|
|
|
|
const syncReadMessages = new libsession.Messages.Outgoing.OpenGroupSyncMessage(
|
|
|
|
|
const syncReadMessages = new libsession.Messages.Outgoing.SyncReadMessage(
|
|
|
|
|
{
|
|
|
|
|
readMessages: reads,
|
|
|
|
|
}
|
|
|
|
@ -467,7 +468,7 @@ MessageSender.prototype = {
|
|
|
|
|
},
|
|
|
|
|
async syncVerification(destination, state, identityKey) {
|
|
|
|
|
const myDevice = textsecure.storage.user.getDeviceId();
|
|
|
|
|
|
|
|
|
|
// FIXME currently not in used
|
|
|
|
|
if (myDevice === 1 || myDevice === '1') {
|
|
|
|
|
return Promise.resolve();
|
|
|
|
|
}
|
|
|
|
|