From fb32e622cbf2fe36f6ba1b497e9c6369be2746c6 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 29 Dec 2019 18:59:51 +0800 Subject: [PATCH] test --- bot.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.go b/bot.go index 9a632db..b6c59df 100644 --- a/bot.go +++ b/bot.go @@ -104,7 +104,7 @@ func botText(m *tb.Message) { log.Printf("botText : m.Chat.ID : %d\n", m.Chat.ID) log.Printf("botText : m.OriginalSender.ID : %d\n", m.OriginalSender.ID) - if (m.Chat.ID == cfg.Bot.Depositchat || m.Chat.ID == cfg.Bot.Mainchat) && int64(m.OriginalSender.ID) == chtwrsbotID64 { + if (m.Chat.ID == cfg.Bot.Depositchat || m.Chat.ID == cfg.Bot.Mainchat) && m.OriginalSender != nil && int64(m.OriginalSender.ID) == chtwrsbotID64 { log.Printf("botText : forwarding message.\n") cwm := ChatWarsMessage{ TGUserID64: int64(m.Sender.ID),