-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: When banning a user they are also removed from the room #12821
fix: When banning a user they are also removed from the room #12821
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should then have a test what happens when adding someone after they get banned.
I do have that test in PR #12801 but the response code might change from 403 to 404 now that we also just remove the participant from the room right away. Could you approve/review that PR first? I'll rebase this branch to main and makes changes as needed |
004cde8
to
c61cc10
Compare
lib/Service/BanService.php
Outdated
@@ -106,6 +107,14 @@ public function createBan(Room $room, string $moderatorActorType, string $modera | |||
$ban->setBannedTime($bannedTime); | |||
$ban->setInternalNote($internalNote); | |||
|
|||
//Remove the banned user from the room | |||
try { | |||
$bannedParticipant = $this->participantService->getParticipantByActor($room, $bannedActorType, $bannedActorId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skip this block when $bannedActorType === 'ip'
c61cc10
to
c0f36e9
Compare
Signed-off-by: skalidindi53 <s.teja2004@gmail.com>
c0f36e9
to
1c6efac
Compare
☑️ Resolves
🛠️ API Checklist
🚧 Tasks
🏁 Checklist