refactor: Recording dialog

This commit is contained in:
Krille 2024-08-05 13:21:12 +02:00
commit 3286b19387
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
2 changed files with 21 additions and 23 deletions

View file

@ -621,10 +621,10 @@ class ChatController extends State<ChatPageWithRoom>
builder: (c) => const RecordingDialog(),
);
if (result == null) return;
final audioFile = File(result.path);
final audioFile = XFile(result.path);
final file = MatrixAudioFile(
bytes: audioFile.readAsBytesSync(),
name: audioFile.path,
bytes: await audioFile.readAsBytes(),
name: result.fileName ?? audioFile.path,
);
await room.sendFileEvent(
file,