You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Mobile: opening an attachment names the file after the link text instead of the imeta filename #8065
On mobile, tapping a file attachment link downloads the file and opens it under the link text instead of the attachment's imetafilename. When the label is prose rather than a file name, the opened or saved file loses its real name and extension.
Where
mobile/lib/features/channels/message_content.dart, in _buildLink: the authenticated download is opened with the link text as the file name:
_buildLink already receives the matching ImetaEntry? imeta, and ImetaEntry (mobile/lib/features/channels/message_media.dart) parses filename. It just isn't used here.
Steps to reproduce
Send a message with a non-media attachment whose link label is not the file name, e.g. content [Quarterly report](https://<relay>/media/<sha256>.pdf) with imeta containing filename q3-report.pdf.
Tap the link on mobile.
Expected: the file opens as q3-report.pdf. Actual: it is opened under Quarterly report, without the .pdf extension, so the system viewer may not recognize it.
Suggested fix
Prefer the imeta filename and fall back to the link text:
imeta?.filename ?? text,
A widget test next to opens local file links through an authenticated download in mobile/test/features/channels/message_content_test.dart can pin it, with a labelled link plus an imeta tag carrying filename.
Activity
fix(mobile): open attachments under the imeta filename
fix(mobile): open attachments under the imeta filename
fix(mobile): open attachments under the imeta filename
fix(mobile): open attachments under the imeta filename
fix(mobile): open attachments under the imeta filename
fix(mobile): open attachments under the imeta filename
fix(mobile): open attachments under the imeta filename
fix(mobile): open attachments under the imeta filename
fix(mobile): open attachments under the imeta filename
fix(mobile): open attachments under the imeta filename
fix(mobile): open attachments under the imeta filename
fix(mobile): open attachments under the imeta filename