From: Eduardo Date: Sat, 30 Mar 2024 18:01:26 +0000 (+0100) Subject: this messages must be forwarded so no chatId but channelID, also the message must... X-Git-Url: http://git.edufdez.es/?a=commitdiff_plain;h=708c65c4e040a235671e5b7185693fe5bfca8d3f;p=sylphiette-bot.git this messages must be forwarded so no chatId but channelID, also the message must go without filtering --- diff --git a/telegram.go b/telegram.go index dbc6910..9fb442c 100644 --- a/telegram.go +++ b/telegram.go @@ -99,6 +99,8 @@ func handleCommand(chatId int64, command string) error { func handleConversation(chatId int64, text string) error { var err error + rawCommand := text + // Clean up the text text = removeCommand(text) text = normaliceString(text) @@ -113,11 +115,13 @@ func handleConversation(chatId int64, text string) error { switch { case regexIssue.MatchString(text): - err = manageIssueMessage(chatId, text) + // no chatID, TgRequestChannelID + err = manageIssueMessage(TgRequestChannelID, rawCommand) return err case regexRequest.MatchString(text): - err = manageSerieRequest(chatId, text) + // no chatID, TgRequestChannelID + err = manageSerieRequest(TgRequestChannelID, rawCommand) return err } }