fix: #9389, allow admins to add themselves to private groups

This commit is contained in:
Barış Soner Uşaklı
2021-03-14 15:20:14 -04:00
parent 482641e30e
commit 5c59354c58
2 changed files with 7 additions and 1 deletions

View File

@@ -98,7 +98,7 @@ groupsAPI.join = async function (caller, data) {
return;
}
if (isSelf && groupData.private && groupData.disableJoinRequests) {
if (!isCallerAdmin && isSelf && groupData.private && groupData.disableJoinRequests) {
throw new Error('[[error:group-join-disabled]]');
}