Fix bad check

This commit is contained in:
Pierre HUBERT 2021-03-06 19:06:40 +01:00
parent 83580fd627
commit ed850258d4

View File

@ -430,7 +430,7 @@ const ConvChatWindow = {
/** @type {Conversation} */ /** @type {Conversation} */
const conv = info.infos; const conv = info.infos;
let isAdmin = conv.members.find(m => m.user_id).is_admin; let isAdmin = conv.members.find(m => m.user_id == userID()).is_admin;
let canAddUser = conv.group_id == null && (conv.can_everyone_add_members || isAdmin); let canAddUser = conv.group_id == null && (conv.can_everyone_add_members || isAdmin);
let canRemoveUsers = isAdmin && canAddUser; let canRemoveUsers = isAdmin && canAddUser;
@ -565,7 +565,7 @@ const ConvChatWindow = {
let removeLink = createElem2({ let removeLink = createElem2({
type: "a", type: "a",
appendTo: status, appendTo: status,
innerHTML: "Remove" innerHTML: tr("Remove")
}) })
removeLink.addEventListener("click", async e => { removeLink.addEventListener("click", async e => {