Skip to content

Commit

Permalink
Merge pull request #2 from safatshahin/MDL-78129
Browse files Browse the repository at this point in the history
MDL-78129 Add power level endpoint for matrix state apis
  • Loading branch information
andrewnicols authored Jul 19, 2023
2 parents d148d24 + 15678c9 commit 16ba3ac
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 @@ -369,6 +369,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 16ba3ac

Please sign in to comment.