diff --git a/src/plugins/roomslist/templates/roomslist.js b/src/plugins/roomslist/templates/roomslist.js index 1065758d40..9b12459ea5 100644 --- a/src/plugins/roomslist/templates/roomslist.js +++ b/src/plugins/roomslist/templates/roomslist.js @@ -59,6 +59,7 @@ function tplRoomItem (el, room) { el.openRoom(ev)}> ${ room.get('num_unread') ? tplUnreadIndicator(room) : (room.get('has_activity') ? tplActivityIndicator() : '') } - ${room.getDisplayName()} + ${room.getDisplayName()} ${ api.settings.get('allow_bookmarks') ? tplBookmark(room) : '' } diff --git a/src/plugins/roomslist/view.js b/src/plugins/roomslist/view.js index 65640e4ed1..982db923c6 100644 --- a/src/plugins/roomslist/view.js +++ b/src/plugins/roomslist/view.js @@ -55,7 +55,7 @@ export class RoomsList extends CustomElement { async openRoom (ev) { ev.preventDefault(); const target = u.ancestor(/** @type {HTMLElement} */(ev.target), '.open-room'); - const name = target.querySelector(".room-name")?.textContent; + const name = target.getAttribute('data-room-name'); const jid = target.getAttribute('data-room-jid'); const data = { 'name': name || Strophe.unescapeNode(Strophe.getNodeFromJid(jid)) || jid