diff --git a/ts/session/types/PubKey.ts b/ts/session/types/PubKey.ts index 8fad0664f..06d07e94d 100644 --- a/ts/session/types/PubKey.ts +++ b/ts/session/types/PubKey.ts @@ -1,5 +1,8 @@ export class PubKey { public static readonly PUBKEY_LEN = 66; + // This is a temporary fix to allow groupPubkeys created from mobile to be handled correctly + // They have a different regex to match + // FIXME move this to a new class which validates group ids and use it in all places where we have group ids (message sending included) public static readonly MOBILE_GROUP_PUBKEY_LEN = 32; private static readonly regexForMobileGroupID = `__textsecure_group__![0-9a-fA-F]{${PubKey.MOBILE_GROUP_PUBKEY_LEN}}`; diff --git a/ts/test/session/crypto/MessageEncrypter_test.ts b/ts/test/session/crypto/MessageEncrypter_test.ts index 2e1753512..6fcb3119e 100644 --- a/ts/test/session/crypto/MessageEncrypter_test.ts +++ b/ts/test/session/crypto/MessageEncrypter_test.ts @@ -52,10 +52,9 @@ describe('MessageEncrypter', () => { it('should return a MEDIUM_GROUP_CIPHERTEXT envelope type', async () => { const data = crypto.randomBytes(10); - sandbox.stub( - Ratchet, - 'encryptWithSenderKey' - ).resolves({ ciphertext: '' }); + sandbox + .stub(Ratchet, 'encryptWithSenderKey') + .resolves({ ciphertext: '' }); const result = await MessageEncrypter.encrypt( TestUtils.generateFakePubKey(),