diff options
author | Julien Veyssier <eneiluj@posteo.net> | 2020-08-31 12:18:18 +0200 |
---|---|---|
committer | Julien Veyssier <eneiluj@posteo.net> | 2020-09-01 13:06:47 +0200 |
commit | b46f39e70d804ed45259800e8d757469e4ae1e07 (patch) | |
tree | 2bdbdfcf0e16c5d21479cb3b7b8d487c95671c2a /lib/Controller/MatterbridgeController.php | |
parent | f0561d0357c5b71d5817ff2a87dfba4923560dc9 (diff) |
show bridge process state and log
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
Diffstat (limited to 'lib/Controller/MatterbridgeController.php')
-rw-r--r-- | lib/Controller/MatterbridgeController.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/Controller/MatterbridgeController.php b/lib/Controller/MatterbridgeController.php index 70489752c..8c44e297a 100644 --- a/lib/Controller/MatterbridgeController.php +++ b/lib/Controller/MatterbridgeController.php @@ -60,12 +60,28 @@ class MatterbridgeController extends AEnvironmentAwareController { * @return DataResponse */ public function getBridgeOfRoom(): DataResponse { - $this->bridgeManager->checkBridge($this->room); + $pid = $this->bridgeManager->checkBridge($this->room); + $logContent = $this->bridgeManager->getBridgeLog($this->room); $bridge = $this->bridgeManager->getBridgeOfRoom($this->room); + $bridge['running'] = ($pid !== 0); + $bridge['log'] = $logContent; return new DataResponse($bridge); } /** + * Get bridge process information + * + * @NoAdminRequired + * @RequireLoggedInModeratorParticipant + * + * @return DataResponse + */ + public function getBridgeProcessState(): DataResponse { + $result = $this->bridgeManager->getBridgeProcessState($this->room); + return new DataResponse($result); + } + + /** * Edit bridge information of one room * * @NoAdminRequired |