Merge pull request #2047 from famedly/karthi/fix-filename

fix: incorrect filename when caption is used in body of event
This commit is contained in:
Krille-chan 2025-03-12 08:07:26 +01:00 committed by GitHub
commit a75e0b9af4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -792,9 +792,11 @@ class Event extends MatrixEvent {
throw ('Unable to decrypt file');
}
}
final filename = content.tryGet<String>('filename') ?? body;
return MatrixFile(
bytes: uint8list,
name: body,
name: filename,
mimeType: attachmentMimetype,
);
}