mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-02-24 18:20:43 +01:00
fix: Play response voice messages
This commit is contained in:
parent
f8cc559ab3
commit
82df5526dd
@ -62,9 +62,8 @@ class _AudioPlayerState extends State<AudioPlayerWidget> {
|
|||||||
final matrixFile =
|
final matrixFile =
|
||||||
await widget.event.downloadAndDecryptAttachmentCached();
|
await widget.event.downloadAndDecryptAttachmentCached();
|
||||||
final tempDir = await getTemporaryDirectory();
|
final tempDir = await getTemporaryDirectory();
|
||||||
final fileName = matrixFile.name.contains('.')
|
final fileName =
|
||||||
? matrixFile.name
|
widget.event.content.tryGet<String>('filename') ?? matrixFile.name;
|
||||||
: '${matrixFile.name}.mp3';
|
|
||||||
final file = File('${tempDir.path}/$fileName');
|
final file = File('${tempDir.path}/$fileName');
|
||||||
await file.writeAsBytes(matrixFile.bytes);
|
await file.writeAsBytes(matrixFile.bytes);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user