Skip to content

fix(cli): accept generic uploads, surface message edits, list DMs#2781

Open
JQuantAnalytics wants to merge 2 commits into
block:mainfrom
JQuantAnalytics:fix/cli-upload-and-message-edits
Open

fix(cli): accept generic uploads, surface message edits, list DMs#2781
JQuantAnalytics wants to merge 2 commits into
block:mainfrom
JQuantAnalytics:fix/cli-upload-and-message-edits

Conversation

@JQuantAnalytics

@JQuantAnalytics JQuantAnalytics commented Jul 24, 2026

Copy link
Copy Markdown

Summary

  • Uploads: Replace the CLI media-only MIME allowlist with the desktop/relay deny-list so plain text and other generic files upload as application/octet-stream (HTML/SVG/executables still blocked).
  • Message edits: messages get/thread overlay the latest kind 40003 edit onto the original (and hide raw edit rows by default); messages search includes 40003, resolves edit hits to overlaid originals, and migration 0025 adds 40003 to the fresh-install FTS allowlist so edited text is indexed.
  • DMs: dms list no longer queries obsolete kind 41001; it lists membership + kind 39000 channels tagged t=dm (matches Desktop).

Context

Found during nest setup smoke on a fresh Buzz community: text upload failed client-side even though the relay already accepts generic files; edits succeeded but CLI reads looked stale; search missed edited bodies because the FTS allowlist omitted kind 40003; dms open worked but dms list stayed empty.

Test plan

  • cargo test -p buzz-cli --lib upload_mime_
  • cargo test -p buzz-cli --lib apply_message_edits
  • cargo test -p buzz-db --lib embedded_migrator_contains_consolidated_initial_schema
  • Live verify with locally built CLI: text upload → BlobDescriptor; dms list returns seeded DM; messages get shows overlaid edit body
  • After merge + relay migrate 0025: buzz messages search --query "<edited text>" hits
  • After Buzz.app CLI release: bundled buzz upload file --file note.txt / dms list / edit overlay

Align buzz-cli with relay/desktop behavior so smoke quirks stop looking like nest misconfig: deny-list MIME for uploads (text/docs), overlay kind:40003 edits in get/thread and search edits, and list DMs via membership metadata instead of obsolete kind 41001.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: jquant <115501859+JQuantAnalytics@users.noreply.github.com>
Signed-off-by: jquant <115501859+JQuantAnalytics@users.noreply.github.com>
@JQuantAnalytics
JQuantAnalytics requested a review from a team as a code owner July 24, 2026 22:56
Fresh-install allowlist omitted message edits, so NIP-50 search could not
find post-edit text even when the CLI requested kind 40003. Expand the
allowlist via migration 0025, update the maintenance script, and overlay
edit hits onto their target messages in `messages search`.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: jquant <115501859+JQuantAnalytics@users.noreply.github.com>
Signed-off-by: jquant <115501859+JQuantAnalytics@users.noreply.github.com>
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.

1 participant