This is an automated email from the ASF dual-hosted git repository. jamesnetherton pushed a commit to branch 2.13.x in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/2.13.x by this push: new fc94628314 Revert "Telegram: Testing subscribing and unsubscribing to Webhook" fc94628314 is described below commit fc946283142ee7ee92656e532c6d124e64fbbbed Author: Zineb Bendhiba <bendhiba.zi...@gmail.com> AuthorDate: Tue Jun 6 15:39:37 2023 +0200 Revert "Telegram: Testing subscribing and unsubscribing to Webhook" This reverts commit 9d2adaadb8033620e8a448dd21a1219c8f18276b. --- .../ROOT/pages/reference/extensions/telegram.adoc | 19 ------------- .../telegram/runtime/src/main/doc/usage.adoc | 14 ---------- integration-tests/telegram/pom.xml | 9 ++++--- .../quarkus/component/telegram/it/Routes.java | 31 ---------------------- .../mappings/telegramWebhook-register.json | 21 --------------- .../mappings/telegramWebhook-unregister.json | 21 --------------- 6 files changed, 5 insertions(+), 110 deletions(-) diff --git a/docs/modules/ROOT/pages/reference/extensions/telegram.adoc b/docs/modules/ROOT/pages/reference/extensions/telegram.adoc index e5cfef4607..ecb36dad6e 100644 --- a/docs/modules/ROOT/pages/reference/extensions/telegram.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/telegram.adoc @@ -45,25 +45,6 @@ ifeval::[{doc-show-user-guide-link} == true] Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications. endif::[] -[id="extensions-telegram-usage"] -== Usage -[id="extensions-telegram-usage-webhook-mode"] -== Webhook Mode - -The Telegram extension supports usage in the webhook mode. - -In order to enable webhook mode, users need first to add a REST implementation to their application. -Maven users, for example, can add *camel-quarkus-rest* extension to their `pom.xml` file: - -[source,xml] ----- -<dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-rest</artifactId> -</dependency> ----- - - [id="extensions-telegram-ssl-in-native-mode"] == SSL in native mode diff --git a/extensions/telegram/runtime/src/main/doc/usage.adoc b/extensions/telegram/runtime/src/main/doc/usage.adoc deleted file mode 100644 index e3960854be..0000000000 --- a/extensions/telegram/runtime/src/main/doc/usage.adoc +++ /dev/null @@ -1,14 +0,0 @@ -== Webhook Mode - -The Telegram extension supports usage in the webhook mode. - -In order to enable webhook mode, users need first to add a REST implementation to their application. -Maven users, for example, can add *camel-quarkus-rest* extension to their `pom.xml` file: - -[source,xml] ----- -<dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-rest</artifactId> -</dependency> ----- \ No newline at end of file diff --git a/integration-tests/telegram/pom.xml b/integration-tests/telegram/pom.xml index ee14865203..ce42acc27a 100644 --- a/integration-tests/telegram/pom.xml +++ b/integration-tests/telegram/pom.xml @@ -43,12 +43,12 @@ <groupId>io.quarkus</groupId> <artifactId>quarkus-resteasy-jackson</artifactId> </dependency> - <!-- Wehbook usage --> + + <!-- To serve the mock Telegram API --> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-rest</artifactId> + <artifactId>camel-quarkus-platform-http</artifactId> </dependency> - <!-- To serve the mock Telegram API --> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-attachments</artifactId> @@ -88,6 +88,7 @@ </dependency> </dependencies> + <profiles> <profile> <id>native</id> @@ -140,7 +141,7 @@ </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-rest-deployment</artifactId> + <artifactId>camel-quarkus-platform-http-deployment</artifactId> <version>${project.version}</version> <type>pom</type> <scope>test</scope> diff --git a/integration-tests/telegram/src/main/java/org/apache/camel/quarkus/component/telegram/it/Routes.java b/integration-tests/telegram/src/main/java/org/apache/camel/quarkus/component/telegram/it/Routes.java deleted file mode 100644 index d7ee2b93f8..0000000000 --- a/integration-tests/telegram/src/main/java/org/apache/camel/quarkus/component/telegram/it/Routes.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.quarkus.component.telegram.it; - -import javax.enterprise.context.ApplicationScoped; - -import org.apache.camel.builder.RouteBuilder; - -@ApplicationScoped -public class Routes extends RouteBuilder { - - @Override - public void configure() throws Exception { - from("webhook:telegram:bots?webhookPath=/my-test&webhook-external-url=http://localhost:8080") - .log("webhook message : ${body}"); - } -} diff --git a/integration-tests/telegram/src/test/resources/mappings/telegramWebhook-register.json b/integration-tests/telegram/src/test/resources/mappings/telegramWebhook-register.json deleted file mode 100644 index 9152c9ff70..0000000000 --- a/integration-tests/telegram/src/test/resources/mappings/telegramWebhook-register.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "id" : "70c0a770-2a98-4f46-ba01-8ba3a71d8e3d", - "name": "botfake-webhook", - "request": { - "url": "/botfake-token/setWebhook?url=http://localhost:8080/my-test", - "method": "GET" - }, - "response": { - "status": 200, - "body": "{\"ok\":true,\"result\":true,\"description\":\"Webhook was set\"}", - "headers": { - "Server": "nginx/1.16.1", - "Date": "Tue, 03 Nov 2020 12:26:06 GMT", - "Content-Type": "application/json", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload" - } - }, - "uuid": "f47c81d1-def8-4246-b14f-2a0555829f7d", - "persistent": true, - "insertionIndex": 8 -} \ No newline at end of file diff --git a/integration-tests/telegram/src/test/resources/mappings/telegramWebhook-unregister.json b/integration-tests/telegram/src/test/resources/mappings/telegramWebhook-unregister.json deleted file mode 100644 index f4e592e7f7..0000000000 --- a/integration-tests/telegram/src/test/resources/mappings/telegramWebhook-unregister.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "id" : "70c0a770-2a98-4f46-ba01-8ba3a71d8e3d", - "name": "botfake-delete-webhook", - "request": { - "url": "/botfake-token/deleteWebhook", - "method": "GET" - }, - "response": { - "status": 200, - "body": "{\"ok\":true,\"result\":true,\"description\":\"Webhook was set\"}", - "headers": { - "Server": "nginx/1.16.1", - "Date": "Tue, 03 Nov 2020 12:26:06 GMT", - "Content-Type": "application/json", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload" - } - }, - "uuid": "f47c81d1-def8-4246-b14f-2a0555829f7d", - "persistent": true, - "insertionIndex": 8 -} \ No newline at end of file