mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-18 05:20:50 +01:00
fix(ban): Don't ban the moderator but the provided actor
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
856fda5b49
commit
d6cf2f2ff2
1 changed files with 6 additions and 7 deletions
|
|
@ -48,17 +48,16 @@ class BanController extends AEnvironmentAwareController {
|
|||
#[RequireModeratorParticipant]
|
||||
public function banActor(string $actorType, string $actorId, string $internalNote = ''): DataResponse {
|
||||
try {
|
||||
$attendee = $this->participant->getAttendee();
|
||||
$roomId = $attendee->getRoomId();
|
||||
$bannedId = $attendee->getActorId();
|
||||
$bannedType = $attendee->getActorType();
|
||||
$moderator = $this->participant->getAttendee();
|
||||
$moderatorActorType = $moderator->getActorType();
|
||||
$moderatorActorId = $moderator->getActorId();
|
||||
|
||||
$ban = $this->banService->createBan(
|
||||
$moderatorActorId,
|
||||
$moderatorActorType,
|
||||
$this->room->getId(),
|
||||
$actorId,
|
||||
$actorType,
|
||||
$roomId,
|
||||
$bannedId,
|
||||
$bannedType,
|
||||
null,
|
||||
$internalNote
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue