From 653efaf9cf0518409bc81dca764af99f5049af95 Mon Sep 17 00:00:00 2001 From: Mikunj Date: Tue, 9 Jun 2020 16:18:02 +1000 Subject: [PATCH] Fixed libsignal-protocol declaration --- .../libsignal-protocol.d.ts | 0 ts/session/crypto/MessageEncrypter.ts | 2 +- ts/test/test-utils/stubs/ciphers/FallBackSessionCipherStub.ts | 2 +- ts/test/test-utils/stubs/ciphers/SecretSessionCipherStub.ts | 2 +- ts/test/test-utils/stubs/ciphers/SessionCipherStub.ts | 2 +- ts/util/user.ts | 2 +- ts/window/index.ts | 2 +- ts/window/types/SecretSessionCipher.ts | 2 +- 8 files changed, 7 insertions(+), 7 deletions(-) rename ts/window/types/libsignal-protocol.ts => libtextsecure/libsignal-protocol.d.ts (100%) diff --git a/ts/window/types/libsignal-protocol.ts b/libtextsecure/libsignal-protocol.d.ts similarity index 100% rename from ts/window/types/libsignal-protocol.ts rename to libtextsecure/libsignal-protocol.d.ts diff --git a/ts/session/crypto/MessageEncrypter.ts b/ts/session/crypto/MessageEncrypter.ts index 0a6c8d5e3..660c2448f 100644 --- a/ts/session/crypto/MessageEncrypter.ts +++ b/ts/session/crypto/MessageEncrypter.ts @@ -1,8 +1,8 @@ import { EncryptionType } from '../types/EncryptionType'; import { SignalService } from '../../protobuf'; import { libloki, libsignal, Signal, textsecure } from '../../window'; -import { CipherTextObject } from '../../window/types/libsignal-protocol'; import { UserUtil } from '../../util'; +import { CipherTextObject } from '../../../libtextsecure/libsignal-protocol'; export function padPlainTextBuffer(messageBuffer: Uint8Array): Uint8Array { const plaintext = new Uint8Array( diff --git a/ts/test/test-utils/stubs/ciphers/FallBackSessionCipherStub.ts b/ts/test/test-utils/stubs/ciphers/FallBackSessionCipherStub.ts index ea30f41ad..22aba7b01 100644 --- a/ts/test/test-utils/stubs/ciphers/FallBackSessionCipherStub.ts +++ b/ts/test/test-utils/stubs/ciphers/FallBackSessionCipherStub.ts @@ -1,4 +1,4 @@ -import { CipherTextObject } from '../../../../window/types/libsignal-protocol'; +import { CipherTextObject } from '../../../../../libtextsecure/libsignal-protocol'; import { SignalService } from '../../../../protobuf'; export class FallBackSessionCipherStub { diff --git a/ts/test/test-utils/stubs/ciphers/SecretSessionCipherStub.ts b/ts/test/test-utils/stubs/ciphers/SecretSessionCipherStub.ts index 826ab7308..ffabce537 100644 --- a/ts/test/test-utils/stubs/ciphers/SecretSessionCipherStub.ts +++ b/ts/test/test-utils/stubs/ciphers/SecretSessionCipherStub.ts @@ -1,5 +1,5 @@ import { SignalService } from '../../../../protobuf'; -import { CipherTextObject } from '../../../../window/types/libsignal-protocol'; +import { CipherTextObject } from '../../../../../libtextsecure/libsignal-protocol'; export class SecretSessionCipherStub { public async encrypt( diff --git a/ts/test/test-utils/stubs/ciphers/SessionCipherStub.ts b/ts/test/test-utils/stubs/ciphers/SessionCipherStub.ts index 421bc6ae1..8f35d8ebc 100644 --- a/ts/test/test-utils/stubs/ciphers/SessionCipherStub.ts +++ b/ts/test/test-utils/stubs/ciphers/SessionCipherStub.ts @@ -1,7 +1,7 @@ import { CipherTextObject, SessionCipher, -} from '../../../../window/types/libsignal-protocol'; +} from '../../../../../libtextsecure/libsignal-protocol'; import { SignalService } from '../../../../protobuf'; export class SessionCipherStub implements SessionCipher { diff --git a/ts/util/user.ts b/ts/util/user.ts index cec8716ec..cea991b17 100644 --- a/ts/util/user.ts +++ b/ts/util/user.ts @@ -1,5 +1,5 @@ import { getItemById } from '../../js/modules/data'; -import { KeyPair } from '../window/types/libsignal-protocol'; +import { KeyPair } from '../../libtextsecure/libsignal-protocol'; export async function getCurrentDevicePubKey(): Promise { const item = await getItemById('number_id'); diff --git a/ts/window/index.ts b/ts/window/index.ts index d24d64142..1e7e909f7 100644 --- a/ts/window/index.ts +++ b/ts/window/index.ts @@ -1,8 +1,8 @@ -import { LibsignalProtocol } from './types/libsignal-protocol'; import { SignalInterface } from './types/signal'; import { LocalizerType } from '../types/Util'; import LokiMessageAPI from '../../js/modules/loki_message_api'; import LokiPublicChatFactoryAPI from '../../js/modules/loki_public_chat_api'; +import { LibsignalProtocol } from '../../libtextsecure/libsignal-protocol'; interface WindowInterface extends Window { seedNodeList: any; diff --git a/ts/window/types/SecretSessionCipher.ts b/ts/window/types/SecretSessionCipher.ts index 7967e2744..bdf1d3ff1 100644 --- a/ts/window/types/SecretSessionCipher.ts +++ b/ts/window/types/SecretSessionCipher.ts @@ -1,5 +1,5 @@ import { SignalService } from '../../protobuf'; -import { CipherTextObject } from './libsignal-protocol'; +import { CipherTextObject } from '../../../libtextsecure/libsignal-protocol'; export declare class SecretSessionCipher { constructor(storage: any);