From e2dd9b9f77e91d65750cd38357dfa2e611ce6d05 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 11 Nov 2020 11:47:13 +0100 Subject: [PATCH] fix typos/refactor errors --- src/domain/session/room/RoomViewModel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/domain/session/room/RoomViewModel.js b/src/domain/session/room/RoomViewModel.js index 6d3fa167..c13dd1a3 100644 --- a/src/domain/session/room/RoomViewModel.js +++ b/src/domain/session/room/RoomViewModel.js @@ -167,11 +167,11 @@ export class RoomViewModel extends ViewModel { async _sendFile() { let file; try { - file = this.platform.openFile(); + file = await this.platform.openFile(); } catch (err) { return; } - const attachment = this._room.uploadAttachment(file.name, file.blob); + const attachment = this._room.uploadAttachment(file.blob, file.name); const content = { body: file.name, msgtype: "m.file",