Skip to content

Commit

Permalink
Fix deploy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rojvv committed May 31, 2024
1 parent f10f46d commit 3e9c8fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@twind/preset-tailwind": "https://esm.sh/@twind/[email protected]/",
"@twind/preset-autoprefix": "https://esm.sh/@twind/[email protected]/",
"$std/": "https://deno.land/[email protected]/",
"mtkruto/": "https://deno.land/x/[email protected].3/",
"mtkruto/": "https://deno.land/x/[email protected].5/",
"grammy/": "https://deno.land/x/[email protected]/",
"dexie": "https://esm.sh/[email protected]",
"dexie-react-hooks": "https://esm.sh/[email protected]?alias=react:preact/compat",
Expand Down
21 changes: 6 additions & 15 deletions islands/InlineMessageIdUnpacker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { ComponentChildren } from "preact";
import { signal, useSignalEffect } from "@preact/signals";

import { base64DecodeUrlSafe } from "mtkruto/utilities/1_base64.ts";
import { TLReader } from "mtkruto/tl/4_tl_reader.ts";
import { id, types } from "mtkruto/2_tl.ts";
import { is, TLReader } from "mtkruto/mod.ts";
import { getType } from "mtkruto/tl/0_api.ts";

import { getHashSignal } from "../lib/hash.ts";
import { setHash } from "../lib/hash.ts";
Expand Down Expand Up @@ -42,13 +42,13 @@ export function InlineMessageIdUnpacker() {
: inputBotInlineMessageID64_CTR;

const object = reader.readObject(cid);
if (object instanceof types.InputBotInlineMessageID) {
if (is("inputBotInlineMessageID", object)) {
data.value = {
dc: object.dc_id.toString(),
id: object.id.toString(),
accessHash: object.access_hash.toString(),
};
} else if (object instanceof types.InputBotInlineMessageID64) {
} else if (is("inputBotInlineMessageID64", object)) {
data.value = {
dc: object.dc_id.toString(),
userId: object.owner_id.toString(),
Expand Down Expand Up @@ -84,17 +84,8 @@ export function InlineMessageIdUnpacker() {
);
}

const inputBotInlineMessageID_CTR = new types.InputBotInlineMessageID({
dc_id: 0,
id: 0n,
access_hash: 0n,
})[id];
const inputBotInlineMessageID64_CTR = new types.InputBotInlineMessageID64({
dc_id: 0,
owner_id: 0n,
id: 0,
access_hash: 0n,
})[id];
const inputBotInlineMessageID_CTR = getType("inputBotInlineMessageID")![0];
const inputBotInlineMessageID64_CTR = getType("inputBotInlineMessageID64")![0];

function Kv({ k, v, c }: { k: string; v: ComponentChildren; c?: string }) { // TODO: merge with FileIdAnalyzer's
return (
Expand Down

0 comments on commit 3e9c8fd

Please sign in to comment.