diff options
author | Joas Schilling <coding@schilljs.com> | 2021-09-27 17:54:29 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-10-07 19:18:31 +0300 |
commit | e115e96d7daa11b70fb270f59825894535f10c7c (patch) | |
tree | 6b9c78e0325c0a33106ea2b3cc1aa6b5e20697fa /lib/Model | |
parent | 1c641f8c64a80753fc46ec27e622c696f1f93fc8 (diff) |
Remove moderator option and clear custom permissions when setting the conversation permissions
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Model')
-rw-r--r-- | lib/Model/AttendeeMapper.php | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/Model/AttendeeMapper.php b/lib/Model/AttendeeMapper.php index 8d3411847..d5faa5aff 100644 --- a/lib/Model/AttendeeMapper.php +++ b/lib/Model/AttendeeMapper.php @@ -198,7 +198,7 @@ class AttendeeMapper extends QBMapper { return (int) $query->execute(); } - public function modifyPermissions(int $roomId, string $mode, int $newState, bool $includeModerators): void { + public function modifyPermissions(int $roomId, string $mode, int $newState): void { $query = $this->db->getQueryBuilder(); $query->update($this->getTableName()) ->where($query->expr()->eq('room_id', $query->createNamedParameter($roomId, IQueryBuilder::PARAM_INT))) @@ -207,14 +207,6 @@ class AttendeeMapper extends QBMapper { Attendee::ACTOR_GROUPS, ], IQueryBuilder::PARAM_STR_ARRAY))); - if (!$includeModerators) { - $query->andWhere($query->expr()->notIn('participant_type', $query->createNamedParameter([ - Participant::OWNER, - Participant::MODERATOR, - Participant::GUEST_MODERATOR, - ], IQueryBuilder::PARAM_INT_ARRAY))); - } - if ($mode === Participant::PERMISSIONS_MODIFY_SET) { $newState |= Attendee::PERMISSIONS_CUSTOM; $query->set('permissions', $query->createNamedParameter($newState, IQueryBuilder::PARAM_INT)); |