Convert signal.js and preload.js to Typescript
This commit is contained in:
parent
e18510e41c
commit
2464e0a9c1
94 changed files with 2113 additions and 1848 deletions
|
@ -4,22 +4,13 @@
|
|||
import * as log from '../logging/log';
|
||||
import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue';
|
||||
import * as Errors from '../types/errors';
|
||||
import MessageSender from '../textsecure/SendMessage';
|
||||
|
||||
export async function sendStickerPackSync(
|
||||
packId: string,
|
||||
packKey: string,
|
||||
installed: boolean
|
||||
): Promise<void> {
|
||||
const { textsecure } = window;
|
||||
|
||||
if (!textsecure.messaging) {
|
||||
log.error(
|
||||
'shim: Cannot call sendStickerPackSync, textsecure.messaging is falsey'
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (window.ConversationController.areWePrimaryDevice()) {
|
||||
log.warn(
|
||||
'shims/sendStickerPackSync: We are primary device; not sending sync'
|
||||
|
@ -29,7 +20,7 @@ export async function sendStickerPackSync(
|
|||
|
||||
try {
|
||||
await singleProtoJobQueue.add(
|
||||
textsecure.messaging.getStickerPackSync([
|
||||
MessageSender.getStickerPackSync([
|
||||
{
|
||||
packId,
|
||||
packKey,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue