Skip to content

Commit

Permalink
Merge pull request #5213 from nextcloud/bugfix/5193/also-drop-guest-m…
Browse files Browse the repository at this point in the history
…oderators

Drop guest moderators when changing a conversation to group conversation
  • Loading branch information
PVince81 authored Feb 20, 2021
2 parents ce8d788 + 77fb711 commit 3a29bbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Room.php
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ public function setType(int $newType): bool {
$query = $this->db->getQueryBuilder();
$query->delete('talk_attendees')
->where($query->expr()->eq('room_id', $query->createNamedParameter($this->getId(), IQueryBuilder::PARAM_INT)))
->andWhere($query->expr()->in('participant_type', $query->createNamedParameter([Participant::GUEST, Participant::USER_SELF_JOINED], IQueryBuilder::PARAM_INT_ARRAY)));
->andWhere($query->expr()->in('participant_type', $query->createNamedParameter([Participant::GUEST, Participant::GUEST_MODERATOR, Participant::USER_SELF_JOINED], IQueryBuilder::PARAM_INT_ARRAY)));
$query->execute();
}

Expand Down

0 comments on commit 3a29bbc

Please sign in to comment.