From c11328a0649aa89e1f46de1657b4c163d48c5adc Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Wed, 11 May 2022 20:25:54 +0530 Subject: [PATCH] Fix crash on leaving room (#532) --- src/client/action/room.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/action/room.js b/src/client/action/room.js index bb96f99..d945a89 100644 --- a/src/client/action/room.js +++ b/src/client/action/room.js @@ -118,7 +118,9 @@ async function leave(roomId) { const isDM = initMatrix.roomList.directs.has(roomId); try { await mx.leave(roomId); - await mx.forget(roomId); + setTimeout(() => { + mx.forget(roomId); + }, 5000); appDispatcher.dispatch({ type: cons.actions.room.LEAVE, roomId,