move parseChatID to parser_markdown_to_html

This commit is contained in:
Aleksandr Bortnikov 2026-03-06 15:45:08 +03:00
parent 1b189f382e
commit 174cd1747b
2 changed files with 6 additions and 6 deletions

View file

@ -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
}

View file

@ -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()