diff --git a/app/lib/methods/sendFileMessage.js b/app/lib/methods/sendFileMessage.js index 12703afca..2b5bdf45b 100644 --- a/app/lib/methods/sendFileMessage.js +++ b/app/lib/methods/sendFileMessage.js @@ -14,7 +14,7 @@ export async function cancelUpload(item) { uploadQueue[item.path].abort(); try { const db = database.active; - await db.database.action(async() => { + await db.action(async() => { await item.destroyPermanently(); }); } catch (e) { diff --git a/app/views/RoomView/UploadProgress.js b/app/views/RoomView/UploadProgress.js index d4f1c398b..aa62f1b62 100644 --- a/app/views/RoomView/UploadProgress.js +++ b/app/views/RoomView/UploadProgress.js @@ -122,7 +122,8 @@ class UploadProgress extends Component { uploads.forEach(async(u) => { if (!RocketChat.isUploadActive(u.path)) { try { - await database.database.action(async() => { + const db = database.active; + await db.action(async() => { await u.update(() => { u.error = true; });