Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
rojvv committed May 23, 2024
1 parent 2a9ff1d commit fc59604
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"@twind/core": "https://esm.sh/@twind/[email protected]",
"@twind/preset-tailwind": "https://esm.sh/@twind/[email protected]/",
"@twind/preset-autoprefix": "https://esm.sh/@twind/[email protected]/",
"$std/": "https://deno.land/std@0.219.0/",
"mtkruto/": "https://deno.land/x/mtkruto@0.1.301/",
"grammy/": "https://deno.land/x/grammy@v1.21.1/",
"$std/": "https://deno.land/std@0.224.0/",
"mtkruto/": "https://deno.land/x/mtkruto@0.2.3/",
"grammy/": "https://deno.land/x/grammy@v1.23.0/",
"dexie": "https://esm.sh/[email protected]",
"dexie-react-hooks": "https://esm.sh/[email protected]?alias=react:preact/compat",
"prism-json": "https://esm.sh/[email protected]/components/prism-json?no-check",
Expand Down
8 changes: 4 additions & 4 deletions workers/connectivity_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ async function handleMessage(
postMessage("exchanging-encryption-keys");
authKey = await getAuthKey(initialDc);
}
/** @type string */
let authString;
let authString: string;
{
const writer = new TLWriter();
writer.writeString(initialDc);
Expand All @@ -40,7 +39,8 @@ async function handleMessage(
authString = base64EncodeUrlSafe(rleEncode(writer.buffer));
}
postMessage(authKey);
client = new Client(new StorageMemory(authString));
client = new Client({ storage: new StorageMemory() });
await client.importAuthString(authString);
await client.connect();
} catch (err) {
console.error(err);
Expand All @@ -53,7 +53,7 @@ async function handleMessage(
for (let i = 0; i < 10; i++) {
const then = now();
try {
await client.api.ping({ ping_id: getRandomId() });
await client.invoke({ _: "ping", ping_id: getRandomId() });
} catch (err) {
if (
i == 0 && !regenerateAuthKey && String(err).includes("was closed") // TODO: Use MTKruto's ConnectionError with instanceof
Expand Down

0 comments on commit fc59604

Please sign in to comment.