diff --git a/packages/rocketchat-message-pin/server/settings.coffee b/packages/rocketchat-message-pin/server/settings.coffee index b83d7960927d..4c6f98bef95a 100644 --- a/packages/rocketchat-message-pin/server/settings.coffee +++ b/packages/rocketchat-message-pin/server/settings.coffee @@ -1,4 +1,4 @@ Meteor.startup -> RocketChat.settings.add 'Message_AllowPinning', true, { type: 'boolean', group: 'Message', public: true } - RocketChat.models.Permissions.upsert( 'pin-message', {$set: { roles: [ 'owner', 'moderator', 'admin' ] } }) + RocketChat.models.Permissions.upsert('pin-message', {$addToSet: {roles: {$each: ['owner', 'moderator', 'admin']}}})