diff options
author | Joas Schilling <coding@schilljs.com> | 2023-01-02 21:51:28 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-08-07 11:35:22 +0200 |
commit | 98244210f0fca4f69b39636551203b13e7c2ba9f (patch) | |
tree | 4ccd1e9a2d36b43f4ddebfb27773479a4723abfe /appinfo | |
parent | 0005e1318efbbfc508ee6ee3d25fdc66a6edbac7 (diff) |
feat(webhooks): Start with implementing webhooks for chat messages
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'appinfo')
-rw-r--r-- | appinfo/info.xml | 2 | ||||
-rw-r--r-- | appinfo/routes.php | 1 | ||||
-rw-r--r-- | appinfo/routes/routesBotController.php | 36 |
3 files changed, 38 insertions, 1 deletions
diff --git a/appinfo/info.xml b/appinfo/info.xml index 3230b8574..d99540c6c 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -16,7 +16,7 @@ And in the works for the [coming versions](https://github.com/nextcloud/spreed/m ]]></description> - <version>18.0.0-dev.1</version> + <version>18.0.0-dev.2</version> <licence>agpl</licence> <author>Daniel Calviño Sánchez</author> diff --git a/appinfo/routes.php b/appinfo/routes.php index e75d8b2c8..be859e962 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -26,6 +26,7 @@ declare(strict_types=1); return array_merge_recursive( include(__DIR__ . '/routes/routesAvatarController.php'), + include(__DIR__ . '/routes/routesBotController.php'), include(__DIR__ . '/routes/routesBreakoutRoomController.php'), include(__DIR__ . '/routes/routesCallController.php'), include(__DIR__ . '/routes/routesCertificateController.php'), diff --git a/appinfo/routes/routesBotController.php b/appinfo/routes/routesBotController.php new file mode 100644 index 000000000..c8a1d5db1 --- /dev/null +++ b/appinfo/routes/routesBotController.php @@ -0,0 +1,36 @@ +<?php + +declare(strict_types=1); +/** + * @copyright Copyright (c) 2023, Joas Schilling <coding@schilljs.com> + * + * @author Joas Schilling <coding@schilljs.com> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +$requirements = [ + 'apiVersion' => 'v1', + 'token' => '[a-z0-9]{4,30}', +]; + +return [ + 'ocs' => [ + /** @see \OCA\Talk\Controller\BotController::sendMessage() */ + ['name' => 'Bot#sendMessage', 'url' => '/api/{apiVersion}/bot/{token}/message', 'verb' => 'POST', 'requirements' => $requirements], + ], +]; |