From 174cd1747bb4c7188d6a6d5479374626d5b1c211 Mon Sep 17 00:00:00 2001 From: Aleksandr Bortnikov Date: Fri, 6 Mar 2026 15:45:08 +0300 Subject: [PATCH] move parseChatID to parser_markdown_to_html --- pkg/channels/telegram/parser_markdown_to_html.go | 6 ++++++ pkg/channels/telegram/telegram.go | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) 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()