Fix muc icons not working due to incorrect target element.
This commit is contained in:
parent
f1734dbb40
commit
92f71bafb2
|
@ -17,6 +17,7 @@
|
|||
- #2936: Fix documentation about enable_smacks option, which is true by default.
|
||||
- #3005: Fix MUC messages with a fallback body not rendering.
|
||||
- #3007: Fix links becoming text when a message is edited
|
||||
- #3018: Fix MUC icons not functioning.
|
||||
|
||||
## 9.1.1 (2022-05-05)
|
||||
|
||||
|
|
|
@ -27,8 +27,8 @@ export function getHeadingButtons (view, buttons) {
|
|||
|
||||
export async function removeBookmarkViaEvent (ev) {
|
||||
ev.preventDefault();
|
||||
const name = ev.target.getAttribute('data-bookmark-name');
|
||||
const jid = ev.target.getAttribute('data-room-jid');
|
||||
const name = ev.currentTarget.getAttribute('data-bookmark-name');
|
||||
const jid = ev.currentTarget.getAttribute('data-room-jid');
|
||||
const result = await api.confirm(__('Are you sure you want to remove the bookmark "%1$s"?', name));
|
||||
if (result) {
|
||||
invokeMap(_converse.bookmarks.where({ jid }), Model.prototype.destroy);
|
||||
|
@ -37,7 +37,7 @@ export async function removeBookmarkViaEvent (ev) {
|
|||
|
||||
export function addBookmarkViaEvent (ev) {
|
||||
ev.preventDefault();
|
||||
const jid = ev.target.getAttribute('data-room-jid');
|
||||
const jid = ev.currentTarget.getAttribute('data-room-jid');
|
||||
api.modal.show(MUCBookmarkFormModal, { jid }, ev);
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue