Skip to content

01a04a23 - Publish kind:0 picture, NIP-65, and kind:1 photo imeta - #66

Merged
TaprootFreak merged 3 commits into
developfrom
01a04a23-nostr-media
Aug 30, 2026
Merged

01a04a23 - Publish kind:0 picture, NIP-65, and kind:1 photo imeta#66
TaprootFreak merged 3 commits into
developfrom
01a04a23-nostr-media

Conversation

@TaprootFreakAI

@TaprootFreakAI TaprootFreakAI commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

EN:
Kind:0 profiles now include the 21.gifts icon as picture, and the worker publishes a NIP-65 kind:10002 relay list so Damus and Primal know where to find notes. Photo posts append a public image URL plus a NIP-92 imeta tag, and GET /messages/:id/photo is unauthenticated so those clients can fetch the bytes. Already-signed photo notes without that URL are re-signed when PUBLIC_BASE_URL is set and the note has no zaps, so receipts still resolve.

DE:
Kind:0-Profile tragen jetzt das 21.gifts-Icon als picture, und der Worker veröffentlicht eine NIP-65-kind:10002-Relay-Liste, damit Damus und Primal die Notes finden. Foto-Posts hängen eine öffentliche Bild-URL plus NIP-92-imeta an, und GET /messages/:id/photo ist unauthentifiziert, damit diese Clients die Bytes laden können. Bereits signierte Foto-Notes ohne diese URL werden neu signiert, wenn PUBLIC_BASE_URL gesetzt ist und die Note keine Zaps hat, damit Receipts weiterhin auflösen.

Details

Kind:0 content always sets picture to https://21.gifts/apple-touch-icon.png (plus existing name / display_name / website / optional lud16).

NIP-65 kind:10002 uses the same reservation/watermark pattern as kind:0 and lists the current write-set relays (r tags). The list is republished when the write-set grows (space-only → public).

Kind:1 photo notes append GET /messages/:id/photo to the content and add imeta (url + m). The public API origin is derived from PUBLIC_BASE_URL (https://21.giftshttps://api.21.gifts, https://dev.21.giftshttps://dev-api.21.gifts).

GET /messages/:id/photo no longer requires a bearer token and sends Cache-Control: public, max-age=86400.

Resign of URL-less photo notes and the publish-batch skip of a stale URL-less snapshot run only when the API base is non-empty and sats is 0. Zapped rows keep eventId. An unset PUBLIC_BASE_URL cannot un-publish and loop.

CONTRIBUTING.md documents PUBLIC_BASE_URL and kind:10002 on the Nostr publish flags. Handbook, SPEC, FLOWS, and e2e titles are updated.

@TaprootFreakAI

Copy link
Copy Markdown
Collaborator Author

EN:
Ready after 3 review passes.
Kind:0 profiles now include the 21.gifts icon, the worker publishes NIP-65 relay lists, and photo notes carry a public URL with NIP-92 imeta.

DE:
Bereit nach 3 Review-Durchläufen.
Kind:0-Profile tragen jetzt das 21.gifts-Icon, der Worker veröffentlicht NIP-65-Relay-Listen, und Foto-Notes tragen eine öffentliche URL mit NIP-92-imeta.

Details

Pass 1: photo resign could drop eventId on zapped notes so receipts would not credit the forum row — resign now skips rows with sats > 0.

Pass 2: the missing-photo query could fill the worker batch with zapped rows, and resetSignedEvent could still clear eventId after a concurrent zap — the store list now filters sats = 0, and the reset CAS requires sats = 0.

Pass 3: both quality and logic reviews reported 0 findings at 691643fc.

Mergeable: MERGEABLE / CLEAN. CI on this head: Typecheck, Lint, Handbook, E2E-check, Test (100% coverage), Build, E2E — success. No open review threads.

@TaprootFreakAI
TaprootFreakAI marked this pull request as ready for review August 30, 2026 12:04
@TaprootFreak
TaprootFreak merged commit 68f4472 into develop Aug 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants