From 53720f56df826b050bc0c5d98a094c9e447eca3a Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 21 Aug 2020 11:55:25 +0200 Subject: [PATCH] some cleanup --- src/matrix/room/RoomSummary.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/matrix/room/RoomSummary.js b/src/matrix/room/RoomSummary.js index bef9424c..a674d9e2 100644 --- a/src/matrix/room/RoomSummary.js +++ b/src/matrix/room/RoomSummary.js @@ -50,14 +50,13 @@ function processEvent(data, event) { data = data.cloneIfNeeded(); data.isEncrypted = true; } - } - if (event.type === "m.room.name") { + } else if (event.type === "m.room.name") { const newName = event.content?.name; if (newName !== data.name) { data = data.cloneIfNeeded(); data.name = newName; } - } if (event.type === "m.room.avatar") { + } else if (event.type === "m.room.avatar") { const newUrl = event.content?.url; if (newUrl !== data.avatarUrl) { data = data.cloneIfNeeded();