From 0b9320f7dc8ca9e73596e46cd6b1434fffd69c61 Mon Sep 17 00:00:00 2001 From: c9s Date: Wed, 14 Sep 2022 02:56:47 +0800 Subject: [PATCH] interact: fix telegram message length check --- pkg/interact/telegram.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/interact/telegram.go b/pkg/interact/telegram.go index 464e9b763..9d4cfc7c6 100644 --- a/pkg/interact/telegram.go +++ b/pkg/interact/telegram.go @@ -157,7 +157,9 @@ func (tm *Telegram) Start(context.Context) { if reply.set { reply.build() - checkSendErr(tm.Bot.Send(m.Chat, reply.message, reply.menu)) + if len(reply.message) > 0 || reply.menu != nil { + checkSendErr(tm.Bot.Send(m.Chat, reply.message, reply.menu)) + } } })