Node.js based forum software built for the modern web
allow member.isOwner to work on an array
Barış Soner Uşaklı0563bb5923ef
diff --git a/src/groups/ownership.js b/src/groups/ownership.jsindex 38d5a699d8..a6bb78e8e6 100644--- a/src/groups/ownership.js+++ b/src/groups/ownership.js@@ -8,7 +8,11 @@ module.exports = function(Groups) {Groups.ownership.isOwner = function(uid, groupName, callback) {// Note: All admins automatically become owners upon joining- db.isSetMember('group:' + groupName + ':owners', uid, callback);+ if (Array.isArray(uid)) {+ db.isSetMembers('group:' + groupName + ':owners', uid, callback);+ } else {+ db.isSetMember('group:' + groupName + ':owners', uid, callback);+ }};Groups.ownership.grant = function(toUid, groupName, callback) {