-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a class of telegram destination to support a new channel and cu…
…stom webhook to select message Signed-off-by: danielkyalo599 <[email protected]>
- Loading branch information
1 parent
f1246d3
commit 072bdd6
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.notifications.spi.model.destination | ||
/* | ||
This class holds the contents of a Telegram destination | ||
*/ | ||
class TelegramDestination( | ||
val token: String, | ||
val chatId: Long, | ||
val url: String = "https://api.telegram.org/bot$token/sendMessage?chat_id=$chatId" | ||
) : WebhookDestination(url, DestinationType.TELEGRAM) |