diff --git a/pkg/channels/telegram/parser_markdown_to_html.go b/pkg/channels/telegram/parser_markdown_to_html.go index bdaa51807..f24ee45cc 100644 --- a/pkg/channels/telegram/parser_markdown_to_html.go +++ b/pkg/channels/telegram/parser_markdown_to_html.go @@ -109,3 +109,9 @@ func escapeHTML(text string) string { text = strings.ReplaceAll(text, ">", ">") return text } + +func parseChatID(chatIDStr string) (int64, error) { + var id int64 + _, err := fmt.Sscanf(chatIDStr, "%d", &id) + return id, err +} diff --git a/pkg/channels/telegram/telegram.go b/pkg/channels/telegram/telegram.go index af0a4bbb8..470714396 100644 --- a/pkg/channels/telegram/telegram.go +++ b/pkg/channels/telegram/telegram.go @@ -570,12 +570,6 @@ func logParseFailed(useMarkdownV2 bool, err error) { ) } -func parseChatID(chatIDStr string) (int64, error) { - var id int64 - _, err := fmt.Sscanf(chatIDStr, "%d", &id) - return id, err -} - // isBotMentioned checks if the bot is mentioned in the message via entities. func (c *TelegramChannel) isBotMentioned(message *telego.Message) bool { botUsername := c.bot.Username()