Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Mobile: opening an attachment names the file after the link text instead of the imeta filename

Aperta Adatta ai principianti
#8,065 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@wenhaoone ci sta già lavorando.

Dal 3/10/2026.

  • #8066 di @wenhaoone — aperta
  • #8086 di @Bartok9 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
90/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
dart, flutter
Ambito
mobile

Direzione di ricerca

Inizia in mobile/lib/features/channels/message_content.dart, in _buildLink, poi esamina ImetaEntry.filename in mobile/lib/features/channels/message_media.dart. Esegui i test widget vicini a «opens local file links through an authenticated download» in mobile/test/features/channels/message_content_test.dart. Il lavoro è completato quando un allegato con etichetta e un nome file imeta si apre con quel nome file, mentre i link che ne sono privi mantengono il testo del link.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

On mobile, tapping a file attachment link downloads the file and opens it under the link text instead of the attachment's imeta filename. 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:

await ref.read(openDownloadedFileProvider)(
  url,
  auth.headersFor(url),
  text,
);

_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

  1. 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.
  2. 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.

Lingua principale
Rust
Stelle
35.3k
Fork
4.7k
Merge medio
2g 15h
PR unite (30g)
175

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di block/buzz

Tutte le issue di block/buzz

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.