diff --git a/deno.json b/deno.json index e65ba98..397468c 100644 --- a/deno.json +++ b/deno.json @@ -22,7 +22,7 @@ "@db/sqlite": "jsr:@db/sqlite@^0.11.1", "@isaacs/ttlcache": "npm:@isaacs/ttlcache@^1.4.1", "@noble/secp256k1": "npm:@noble/secp256k1@^2.0.0", - "@nostrify/nostrify": "jsr:@nostrify/nostrify@^0.22.4", + "@nostrify/nostrify": "jsr:@nostrify/nostrify@^0.22.5", "@scure/base": "npm:@scure/base@^1.1.6", "@sentry/deno": "https://deno.land/x/sentry@7.112.2/index.mjs", "@soapbox/kysely-deno-sqlite": "jsr:@soapbox/kysely-deno-sqlite@^2.1.0", diff --git a/deno.lock b/deno.lock index 8410bc5..1471f47 100644 --- a/deno.lock +++ b/deno.lock @@ -8,6 +8,7 @@ "jsr:@gleasonator/policy": "jsr:@gleasonator/policy@0.2.0", "jsr:@nostrify/nostrify@^0.22.1": "jsr:@nostrify/nostrify@0.22.4", "jsr:@nostrify/nostrify@^0.22.4": "jsr:@nostrify/nostrify@0.22.4", + "jsr:@nostrify/nostrify@^0.22.5": "jsr:@nostrify/nostrify@0.22.5", "jsr:@soapbox/kysely-deno-sqlite@^2.1.0": "jsr:@soapbox/kysely-deno-sqlite@2.2.0", "jsr:@soapbox/stickynotes@^0.4.0": "jsr:@soapbox/stickynotes@0.4.0", "jsr:@std/assert@^0.217.0": "jsr:@std/assert@0.217.0", @@ -50,6 +51,7 @@ "npm:nostr-relaypool2@0.6.34": "npm:nostr-relaypool2@0.6.34", "npm:nostr-tools@2.5.1": "npm:nostr-tools@2.5.1", "npm:nostr-tools@^2.5.0": "npm:nostr-tools@2.5.1", + "npm:nostr-tools@^2.7.0": "npm:nostr-tools@2.7.0", "npm:nostr-wasm@^0.1.0": "npm:nostr-wasm@0.1.0", "npm:tldts@^6.0.14": "npm:tldts@6.1.18", "npm:type-fest@^4.3.0": "npm:type-fest@4.18.2", @@ -101,6 +103,19 @@ "npm:zod@^3.23.8" ] }, + "@nostrify/nostrify@0.22.5": { + "integrity": "5b9c17325cc02e37c71e14ac0103b40446b0402fe183e5f5362af23e9ea162bf", + "dependencies": [ + "jsr:@std/encoding@^0.224.1", + "npm:@scure/bip32@^1.4.0", + "npm:@scure/bip39@^1.3.0", + "npm:kysely@^0.27.3", + "npm:lru-cache@^10.2.0", + "npm:nostr-tools@^2.7.0", + "npm:websocket-ts@^2.1.5", + "npm:zod@^3.23.8" + ] + }, "@soapbox/kysely-deno-sqlite@2.2.0": { "integrity": "668ec94600bc4b4d7bd618dd7ca65d4ef30ee61c46ffcb379b6f45203c08517a", "dependencies": [ @@ -723,6 +738,18 @@ "nostr-wasm": "nostr-wasm@0.1.0" } }, + "nostr-tools@2.7.0": { + "integrity": "sha512-jJoL2J1CBiKDxaXZww27nY/Wsuxzx7AULxmGKFce4sskDu1tohNyfnzYQ8BvDyvkstU8kNZUAXPL32tre33uig==", + "dependencies": { + "@noble/ciphers": "@noble/ciphers@0.5.3", + "@noble/curves": "@noble/curves@1.2.0", + "@noble/hashes": "@noble/hashes@1.3.1", + "@scure/base": "@scure/base@1.1.1", + "@scure/bip32": "@scure/bip32@1.3.1", + "@scure/bip39": "@scure/bip39@1.2.1", + "nostr-wasm": "nostr-wasm@0.1.0" + } + }, "nostr-wasm@0.1.0": { "integrity": "sha512-78BTryCLcLYv96ONU8Ws3Q1JzjlAt+43pWQhIl86xZmWeegYCNLPml7yQ+gG3vR6V5h4XGj+TxO+SS5dsThQIA==", "dependencies": {} @@ -1155,7 +1182,7 @@ "dependencies": [ "jsr:@bradenmacdonald/s3-lite-client@^0.7.4", "jsr:@db/sqlite@^0.11.1", - "jsr:@nostrify/nostrify@^0.22.4", + "jsr:@nostrify/nostrify@^0.22.5", "jsr:@soapbox/kysely-deno-sqlite@^2.1.0", "jsr:@soapbox/stickynotes@^0.4.0", "jsr:@std/assert@^0.225.1", diff --git a/src/views/mastodon/attachments.ts b/src/views/mastodon/attachments.ts index 2d65804..0be61cb 100644 --- a/src/views/mastodon/attachments.ts +++ b/src/views/mastodon/attachments.ts @@ -16,7 +16,7 @@ function renderAttachment(media: { id?: string; data: string[][] }) { const [width, height] = dim?.split('x').map(Number) ?? [null, null]; - const meta = (typeof width === 'number' && typeof height === 'number') + const meta = (width && height) ? { original: { width,