Skip to content

feat: expose file id in message output#12

Merged
jonathanlam merged 1 commit into
mainfrom
fix/expose-file-id-in-messages
Jun 12, 2026
Merged

feat: expose file id in message output#12
jonathanlam merged 1 commit into
mainfrom
fix/expose-file-id-in-messages

Conversation

@jonathanlam

@jonathanlam jonathanlam commented Jun 12, 2026

Copy link
Copy Markdown
Member

The files array on message list / message get was missing the file id — it only carried name, mimetype, permalink and size. That left the file download and file info commands unreachable for attachments discovered through a message, since both take a file id and the only place the id appeared was buried in the permalink URL.

This adds id to the compact file metadata so the download path works end to end: read a message, grab the attachment id, pull the bytes with file download.

Also documents the file info / file download / file upload commands in the usage guide — they existed but werent written up anywhere.

Test

  • go build ./..., go vet ./... clean
  • Verified file download/info/upload help and that message output now includes the id field

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

The files array in `message list`/`message get` only carried name,
mimetype, permalink and size — not the id. Without the id there was no
way to pull an attachment seen in a message through `file download` /
`file info`, since both take a file id. Add it to CompactFile so the
download path is actually reachable from a message.

Also document the file info/download/upload commands in the usage guide,
which weren't covered before.
@jonathanlam jonathanlam added the minor Minor version updates (features) label Jun 12, 2026
@jonathanlam jonathanlam marked this pull request as ready for review June 12, 2026 05:18
@jonathanlam jonathanlam merged commit 3e67158 into main Jun 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Minor version updates (features)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant