This commit is contained in:
shoopea 2019-12-29 18:59:51 +08:00
parent 328931f97c
commit fb32e622cb

2
bot.go
View File

@ -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),