|
@@ -55,7 +55,7 @@ export class RoomsList extends CustomElement {
|
|
|
}
|
|
|
|
|
|
showRoomDetailsModal (ev) { // eslint-disable-line class-methods-use-this
|
|
|
- const jid = ev.target.getAttribute('data-room-jid');
|
|
|
+ const jid = ev.currentTarget.getAttribute('data-room-jid');
|
|
|
const room = _converse.chatboxes.get(jid);
|
|
|
ev.preventDefault();
|
|
|
api.modal.show(RoomDetailsModal, {'model': room}, ev);
|
|
@@ -73,10 +73,10 @@ export class RoomsList extends CustomElement {
|
|
|
|
|
|
async closeRoom (ev) { // eslint-disable-line class-methods-use-this
|
|
|
ev.preventDefault();
|
|
|
- const name = ev.target.getAttribute('data-room-name');
|
|
|
+ const name = ev.currentTarget.getAttribute('data-room-name');
|
|
|
+ const jid = ev.currentTarget.getAttribute('data-room-jid');
|
|
|
const result = await api.confirm(__("Are you sure you want to leave the groupchat %1$s?", name));
|
|
|
if (result) {
|
|
|
- const jid = ev.target.getAttribute('data-room-jid');
|
|
|
const room = await api.rooms.get(jid);
|
|
|
room.close();
|
|
|
}
|