Fix crash on load and room creation (#418)

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura authored and GitHub committed 2022-03-23 18:44:53 +05:30
1 parent 4b453ff527
commit ae9db88424
2 files changed
+12 -2

No files matched your search

@@ -35,7 +35,12 @@ const items = [{
function setRoomNotifType(roomId, newType) {
const mx = initMatrix.matrixClient;
const { notifications } = initMatrix;
const roomPushRule = mx.getRoomPushRule('global', roomId);
let roomPushRule;
try {
roomPushRule = mx.getRoomPushRule('global', roomId);
} catch {
roomPushRule = undefined;
}
const promises = [];
if (newType === cons.notifs.MUTE) {