Skip to content

Mobile: Show images and files inside chat messages #1719

Closed

Description

@DoodleBears

Problem and context / 问题与背景

The mobile DM can send photos and files (#1715), but every message with attachments still reads "N attachments. Open in the full client to view." That applies to the Human's own messages and to Bot replies, so a photo just sent is not visible in the chat.

Smallest useful scope / 最小有用范围

Included:

  • Bubbles show image attachments as thumbnails and other files as a row with an icon, name and size.
  • An image loads from the Host's GET /api/botharness/attachment through the device gateway (/botharness-device/api/...), with the device Authorization header, the same way Bot avatars load.
  • A pending message shows its local files right away, using the URIs the composer picked.
  • Tapping an image opens a full-screen viewer. Tapping a file downloads it and opens the system share sheet.
  • Bridged IM media (bridgeMedia) uses the same rendering where the Host serves it.
  • Message parsing keeps the attachment refs (ConversationMessage today keeps only a count).

Excluded:

  • Video playback and audio playback beyond download and share.

How to verify / 如何验收

  • Fake-Host tests check that refs reach the snapshot and that the right URL and headers are built.
  • Against an isolated Host, send a photo and a PDF from the composer. Both render in the bubble after the commit, and the image opens full screen.
  • PR screenshots in light and dark.
  • If a new native package is added (for example for sharing), the PR says the dev client must be rebuilt.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions