move parseChatID to parser_markdown_to_html
This commit is contained in:
parent
1b189f382e
commit
174cd1747b
2 changed files with 6 additions and 6 deletions
|
|
@ -109,3 +109,9 @@ func escapeHTML(text string) string {
|
||||||
text = strings.ReplaceAll(text, ">", ">")
|
text = strings.ReplaceAll(text, ">", ">")
|
||||||
return text
|
return text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func parseChatID(chatIDStr string) (int64, error) {
|
||||||
|
var id int64
|
||||||
|
_, err := fmt.Sscanf(chatIDStr, "%d", &id)
|
||||||
|
return id, err
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -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.
|
// isBotMentioned checks if the bot is mentioned in the message via entities.
|
||||||
func (c *TelegramChannel) isBotMentioned(message *telego.Message) bool {
|
func (c *TelegramChannel) isBotMentioned(message *telego.Message) bool {
|
||||||
botUsername := c.bot.Username()
|
botUsername := c.bot.Username()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue