mirror of
https://github.com/danieldemus/openhab-addons
synced 2026-07-29 12:34:21 +02:00
Add support for MarkdownV2 (#19522)
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
This commit is contained in:
@@ -63,7 +63,7 @@ In order to send a message, an action must be used instead.
|
||||
|-------------------|---------|----------|---------------------------------------------------------------------------------------------------------------------|
|
||||
| `chatIds` | | Yes | A list of chatIds that are entered one per line in the UI, or are comma separated values when using textual config. |
|
||||
| `botToken` | | Yes | Authentication token that looks like 1122334455:AABBCCDDEEFFGG1122334455667788 |
|
||||
| `parseMode` | None | No | Support for formatted messages, values: Markdown or HTML. |
|
||||
| `parseMode` | None | No | Support for formatted messages, values: Markdown, MarkdownV2 or HTML. |
|
||||
| `proxyHost` | None | No | Proxy host for telegram binding. |
|
||||
| `proxyPort` | None | No | Proxy port for telegram binding. |
|
||||
| `proxyType` | SOCKS5 | No | Type of proxy server for telegram binding (SOCKS5 or HTTP). |
|
||||
|
||||
+2
-1
@@ -156,7 +156,8 @@ public class TelegramHandler extends BaseThingHandler {
|
||||
try {
|
||||
parseMode = ParseMode.valueOf(parseModeAsString);
|
||||
} catch (IllegalArgumentException e) {
|
||||
logger.warn("parseMode is invalid and will be ignored. Only Markdown or HTML are allowed values");
|
||||
logger.warn(
|
||||
"parseMode is invalid and will be ignored. Only Markdown, MarkdownV2 or HTML are allowed values");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -17,10 +17,11 @@ thing-type.config.telegram.telegramBot.chatIds.description = One or more chat id
|
||||
thing-type.config.telegram.telegramBot.longPollingTime.label = Long Polling Time
|
||||
thing-type.config.telegram.telegramBot.longPollingTime.description = Enter the long polling time in seconds.
|
||||
thing-type.config.telegram.telegramBot.parseMode.label = Parse Mode
|
||||
thing-type.config.telegram.telegramBot.parseMode.description = Support for formatted messages, values: Markdown or HTML. Default: no formatting is used.
|
||||
thing-type.config.telegram.telegramBot.parseMode.description = Support for formatted messages, values: Markdown, MarkdownV2 or HTML. Default: no formatting is used.
|
||||
thing-type.config.telegram.telegramBot.parseMode.option. = No Formatting
|
||||
thing-type.config.telegram.telegramBot.parseMode.option.HTML = HTML
|
||||
thing-type.config.telegram.telegramBot.parseMode.option.Markdown = Markdown
|
||||
thing-type.config.telegram.telegramBot.parseMode.option.MarkdownV2 = MarkdownV2
|
||||
thing-type.config.telegram.telegramBot.proxyHost.label = Proxy Host
|
||||
thing-type.config.telegram.telegramBot.proxyHost.description = Enter your proxy host. It will be used for telegram binding only and doesn't affect entire system.
|
||||
thing-type.config.telegram.telegramBot.proxyPort.label = Proxy Port
|
||||
|
||||
+2
-1
@@ -38,9 +38,10 @@
|
||||
<option value="">No Formatting</option>
|
||||
<option value="HTML">HTML</option>
|
||||
<option value="Markdown">Markdown</option>
|
||||
<option value="MarkdownV2">MarkdownV2</option>
|
||||
</options>
|
||||
<default></default>
|
||||
<description>Support for formatted messages, values: Markdown or HTML. Default: no formatting is used.</description>
|
||||
<description>Support for formatted messages, values: Markdown, MarkdownV2 or HTML. Default: no formatting is used.</description>
|
||||
</parameter>
|
||||
<parameter name="proxyHost" type="text">
|
||||
<context>network-address</context>
|
||||
|
||||
Reference in New Issue
Block a user