Skip to content

Commit

Permalink
MDL-78129 Add power level endpoint for matrix state apis
Browse files Browse the repository at this point in the history
  • Loading branch information
safatshahin committed Jul 19, 2023
1 parent 4c5138b commit 15678c9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions application/src/Controller/MatrixController.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,12 @@ public function roomState(string $serverID, string $roomID, string $eventType, R
return $check['message'];
}
$room->setAvatar($payload->url);
} elseif ($eventType == 'm.room.power_levels') {
// Room power level api call validation to check if the users are passed in the payload to update the power level.
$check = $this->validateRequest((array)$payload, ['users']);
if (!$check['status']) {
return $check['message'];
}
} else {
// Unknown state.
return new JsonResponse((object) [
Expand Down

0 comments on commit 15678c9

Please sign in to comment.