diff --git a/js/models/conversations.js b/js/models/conversations.js index d4d78f16b..987817412 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -1394,7 +1394,9 @@ // Special-case the self-send case - we send only a sync message if (members.length === 1) { - const isOurDevice = await libsession.Protocols.MultiDeviceProtocol.isOurDevice(members[0]); + const isOurDevice = await libsession.Protocols.MultiDeviceProtocol.isOurDevice( + members[0] + ); if (isOurDevice) { await message.sendSyncMessageOnly(closedGroupChatMessage); return true; @@ -1970,11 +1972,17 @@ try { // Exclude our device from members and send them the message const ourNumber = textsecure.storage.user.getNumber(); - const primary = await libsession.Protocols.MultiDeviceProtocol.getPrimaryDevice(ourNumber); - const otherMembers = (members || []).filter(member => !primary.isEqual(member)); + const primary = await libsession.Protocols.MultiDeviceProtocol.getPrimaryDevice( + ourNumber + ); + const otherMembers = (members || []).filter( + member => !primary.isEqual(member) + ); const sendPromises = otherMembers.map(member => { const memberPubKey = libsession.Types.PubKey.cast(member); - return libsession.getMessageQueue().sendUsingMultiDevice(memberPubKey, message); + return libsession + .getMessageQueue() + .sendUsingMultiDevice(memberPubKey, message); }); await Promise.all(sendPromises); diff --git a/js/models/messages.js b/js/models/messages.js index 3c402d9f3..ae60a3283 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -1101,7 +1101,9 @@ // Special-case the self-send case - we send only a sync message if (recipients.length === 1) { - const isOurDevice = await libsession.Protocols.MultiDeviceProtocol.isOurDevice(recipients[0]); + const isOurDevice = await libsession.Protocols.MultiDeviceProtocol.isOurDevice( + recipients[0] + ); if (isOurDevice) { return this.sendSyncMessageOnly(chatMessage); } diff --git a/ts/receiver/dataMessage.ts b/ts/receiver/dataMessage.ts index beffafcbe..b6ec395c9 100644 --- a/ts/receiver/dataMessage.ts +++ b/ts/receiver/dataMessage.ts @@ -508,7 +508,7 @@ function createMessage( } function sendDeliveryReceipt(source: string, timestamp: any) { -// FIXME audric + // FIXME audric // const receiptMessage = new DeliveryReceiptMessage({ // timestamp: Date.now(), // timestamps: [timestamp], diff --git a/ts/session/messages/outgoing/content/data/group/ClosedGroupUpdateMessage.ts b/ts/session/messages/outgoing/content/data/group/ClosedGroupUpdateMessage.ts index 3c4aa14c0..dfcbf14c2 100644 --- a/ts/session/messages/outgoing/content/data/group/ClosedGroupUpdateMessage.ts +++ b/ts/session/messages/outgoing/content/data/group/ClosedGroupUpdateMessage.ts @@ -1,12 +1,9 @@ -import { DataMessage } from '../DataMessage'; import { SignalService } from '../../../../../../protobuf'; -import { StringUtils } from '../../../../../utils'; import { ClosedGroupMessage, ClosedGroupMessageParams, } from './ClosedGroupMessage'; import { AttachmentPointer } from '../ChatMessage'; -import { PubKey } from '../../../../../types'; export interface ClosedGroupUpdateMessageParams extends ClosedGroupMessageParams { diff --git a/ts/session/utils/Protobuf.ts b/ts/session/utils/Protobuf.ts index ac9023803..59f6a0e91 100644 --- a/ts/session/utils/Protobuf.ts +++ b/ts/session/utils/Protobuf.ts @@ -8,9 +8,18 @@ import ByteBuffer from 'bytebuffer'; */ export function convertToTS(object: any): any { // No idea why js `ByteBuffer` and ts `ByteBuffer` differ ... - if (object && object.constructor && object.constructor.name === 'ByteBuffer') { + if ( + object && + object.constructor && + object.constructor.name === 'ByteBuffer' + ) { return new Uint8Array(object.toArrayBuffer()); - } else if (object instanceof ByteBuffer || object instanceof Buffer || object instanceof ArrayBuffer || object instanceof SharedArrayBuffer) { + } else if ( + object instanceof ByteBuffer || + object instanceof Buffer || + object instanceof ArrayBuffer || + object instanceof SharedArrayBuffer + ) { const arrayBuffer = ByteBuffer.wrap(object).toArrayBuffer(); return new Uint8Array(arrayBuffer); } else if (Array.isArray(object)) { diff --git a/ts/session/utils/index.ts b/ts/session/utils/index.ts index 2db75fa65..5548d7125 100644 --- a/ts/session/utils/index.ts +++ b/ts/session/utils/index.ts @@ -15,5 +15,5 @@ export { GroupUtils, StringUtils, PromiseUtils, - ProtobufUtils + ProtobufUtils, };