Split out of #64 (see PR #90). APIClient.refreshMessageMetadata(messageId:) is implemented and
tested but has no caller; #64 kept it rather than deleting it because there is a real use, but
wiring it changes the publish path and deserved its own change.
What the web does
POST /api/messages/{id}/metadata fetches OpenGraph metadata for a message's links. The web fires
it after publishing (components/messages/MessageInput.tsx:511) and again after an edit,
fire-and-forget with a swallowed failure, so a new post's link previews populate without a reload.
iOS today
ComposeView renders a live preview while composing, but nothing refreshes metadata on the server
after the message is created — so the link preview can be missing on the feed until something else
populates it.
Build this
Acceptance criteria
Files: Views/ComposeView.swift, Services/APIClient.swift:370.
Split out of #64 (see PR #90).
APIClient.refreshMessageMetadata(messageId:)is implemented andtested but has no caller; #64 kept it rather than deleting it because there is a real use, but
wiring it changes the publish path and deserved its own change.
What the web does
POST /api/messages/{id}/metadatafetches OpenGraph metadata for a message's links. The web firesit after publishing (
components/messages/MessageInput.tsx:511) and again after an edit,fire-and-forget with a swallowed failure, so a new post's link previews populate without a reload.
iOS today
ComposeViewrenders a live preview while composing, but nothing refreshes metadata on the serverafter the message is created — so the link preview can be missing on the feed until something else
populates it.
Build this
refreshMessageMetadata(messageId:)after a successful publish inComposeView,fire-and-forget, only when the posted content contained at least one URL.
path or block the success alert.
Acceptance criteria
Files:
Views/ComposeView.swift,Services/APIClient.swift:370.