Skip to content
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

Merged

Conversation

skalidindi53
Copy link
Contributor

☑️ Resolves

🛠️ API Checklist

🚧 Tasks

  • Removes users from the room when they are banned

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible

Copy link
Member

@nickvergessen nickvergessen left a 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.

@skalidindi53
Copy link
Contributor Author

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

@skalidindi53 skalidindi53 force-pushed the skalidindi53/12804/Remove-user-from-room-after-banned branch from 004cde8 to c61cc10 Compare August 5, 2024 19:53
@skalidindi53 skalidindi53 marked this pull request as ready for review August 5, 2024 20:09
@@ -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);
Copy link
Member

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'

@skalidindi53 skalidindi53 force-pushed the skalidindi53/12804/Remove-user-from-room-after-banned branch from c61cc10 to c0f36e9 Compare August 12, 2024 15:58
Signed-off-by: skalidindi53 <s.teja2004@gmail.com>
@skalidindi53 skalidindi53 force-pushed the skalidindi53/12804/Remove-user-from-room-after-banned branch from c0f36e9 to 1c6efac Compare August 12, 2024 16:03
@nickvergessen nickvergessen merged commit d8372fd into main Aug 12, 2024
66 checks passed
@nickvergessen nickvergessen deleted the skalidindi53/12804/Remove-user-from-room-after-banned branch August 12, 2024 16:41
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ☑️ Done
Development

Successfully merging this pull request may close these issues.

Banning should remove the participant server-side
3 participants