this messages must be forwarded so no chatId but channelID, also the message must...
authorEduardo <[email protected]>
Sat, 30 Mar 2024 18:01:26 +0000 (19:01 +0100)
committerEduardo <[email protected]>
Sat, 30 Mar 2024 18:01:26 +0000 (19:01 +0100)
telegram.go

index dbc691068e153d9882f91b3236cadc013da2838e..9fb442cce25cb1ef1ad6c7aa5d5456bcc79f0dc6 100644 (file)
@@ -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
                }
        }