]> git.giacomolli.uk - onechat/blobdiff - telegram.go
Require consent and review for autosquash
[onechat] / telegram.go
index 3d676d6961955c2d86c0b63d20c9046d7fcc0d89..78a1c7af9079c22982a02ec19bd2d377c0f71fde 100644 (file)
@@ -585,13 +585,13 @@ func (b *TelegramBot) sendOutage() *TelegramOutage {
 }
 
 // Notify queues event for the chat. It never blocks, so a slow network does not
 }
 
 // Notify queues event for the chat. It never blocks, so a slow network does not
-// stop the agent. The WhatsApp batches and the runs of the schedules do not go
-// to the chat: the reply of the agent tells the user what needs the user.
+// stop the agent. External events, WhatsApp batches, and schedule runs do not
+// go to the chat: the reply of the agent tells the user what needs the user.
 func (b *TelegramBot) Notify(event Event) {
        switch event.Kind {
        case "busy", "idle", "reply", "error", "notice", "subagent":
        case "work":
 func (b *TelegramBot) Notify(event Event) {
        switch event.Kind {
        case "busy", "idle", "reply", "error", "notice", "subagent":
        case "work":
-               if event.Source == whatsappSource || event.Source == scheduleSource {
+               if event.Source == whatsappSource || event.Source == scheduleSource || event.Source == notifySource {
                        return
                }
        case "user":
                        return
                }
        case "user":