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(federation): Don't allow manipulating federated conversations for… #11855

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/Command/Room/Add.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return 1;
}

if ($room->isFederatedConversation()) {
$output->writeln('<error>Room is a federated conversation.</error>');
return 1;
}

if (!in_array($room->getType(), [Room::TYPE_GROUP, Room::TYPE_PUBLIC], true)) {
$output->writeln('<error>Room is no group call.</error>');
return 1;
Expand Down
5 changes: 5 additions & 0 deletions lib/Command/Room/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return 1;
}

if ($room->isFederatedConversation()) {
$output->writeln('<error>Room is a federated conversation.</error>');
return 1;
}

if (!in_array($room->getType(), [Room::TYPE_GROUP, Room::TYPE_PUBLIC], true)) {
$output->writeln('<error>Room is no group call.</error>');
return 1;
Expand Down
5 changes: 5 additions & 0 deletions lib/Command/Room/Demote.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return 1;
}

if ($room->isFederatedConversation()) {
$output->writeln('<error>Room is a federated conversation.</error>');
return 1;
}

if (!in_array($room->getType(), [Room::TYPE_GROUP, Room::TYPE_PUBLIC], true)) {
$output->writeln('<error>Room is no group call.</error>');
return 1;
Expand Down
5 changes: 5 additions & 0 deletions lib/Command/Room/Promote.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return 1;
}

if ($room->isFederatedConversation()) {
$output->writeln('<error>Room is a federated conversation.</error>');
return 1;
}

if (!in_array($room->getType(), [Room::TYPE_GROUP, Room::TYPE_PUBLIC], true)) {
$output->writeln('<error>Room is no group call.</error>');
return 1;
Expand Down
5 changes: 5 additions & 0 deletions lib/Command/Room/Remove.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return 1;
}

if ($room->isFederatedConversation()) {
$output->writeln('<error>Room is a federated conversation.</error>');
return 1;
}

if (!in_array($room->getType(), [Room::TYPE_GROUP, Room::TYPE_PUBLIC], true)) {
$output->writeln('<error>Room is no group call.</error>');
return 1;
Expand Down
5 changes: 5 additions & 0 deletions lib/Command/Room/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return 1;
}

if ($room->isFederatedConversation()) {
$output->writeln('<error>Room is a federated conversation.</error>');
return 1;
}

if (!in_array($room->getType(), [Room::TYPE_GROUP, Room::TYPE_PUBLIC], true)) {
$output->writeln('<error>Room is no group call.</error>');
return 1;
Expand Down
Loading