diff --git a/mods/talk.go b/mods/talk.go index 25d2291..c33608e 100644 --- a/mods/talk.go +++ b/mods/talk.go @@ -71,6 +71,7 @@ func talk(broker *tg.Broker, update tg.APIMessage) { return } text := *(update.Text) + quoted := false // Make sure it's aimed at Clessy if strings.Index(text, "@"+*botname) >= 0 { @@ -81,6 +82,7 @@ func talk(broker *tg.Broker, update tg.APIMessage) { text = strings.TrimLeft(text[len("clessy"):], ":,") } else if text[0] != '/' && update.ReplyTo != nil && update.ReplyTo.User.Username == *botname { // Reply to Clessy (previous prompt?) which is not a command (such as unsplash), pass + quoted = true } else if update.Chat.Username != nil { // Private chat, pass } else { @@ -191,7 +193,10 @@ func talk(broker *tg.Broker, update tg.APIMessage) { reply += "\nAlternativamente:\n - " + strings.Join(result.Alternatives, "\n - ") } case "input.unknown": - // NOOP + // Don't reply if quoted (probably just a comment) + if quoted { + return + } default: log.Printf("[talk] Unknown action called:\n%s\n", record.Result.Action) }