From a87baa28d303bfeea08d663deab06947976d6f8b Mon Sep 17 00:00:00 2001 From: shoopea Date: Sat, 12 Oct 2019 13:29:15 +0800 Subject: [PATCH] fix --- td.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/td.go b/td.go index 7f4c482..ab29be6 100644 --- a/td.go +++ b/td.go @@ -39,8 +39,8 @@ func ListenMQ(c *tdlib.Client, msgs <-chan TGCommand) { func ListenTG(c *tdlib.Client) { eventFilter := func(msg *tdlib.TdMessage) bool { updateMsg := (*msg).(*tdlib.UpdateNewMessage) - chatID := updateMsg.Message.ChatID - userID := updateMsg.Message.SenderUserID + chatID := int64(updateMsg.Message.ChatID) + userID := int64(updateMsg.Message.SenderUserID) forwardInfo := updateMsg.Message.ForwardInfo for k, v := range cfg.Listen { if (v.Chat == chatID || v.Chat == 0) && @@ -95,11 +95,7 @@ func getHistory(c *tdlib.Client, chatID64 *int64, senderUserID64 *int64) { var chat int64 var m ChatWarsMessage - if *chatID64 == 0 { - chat = user_chtwrsbot - } else { - chat = *chatID64 - } + chat = *chatID64 if *senderUserID64 != 0 { userDetails, err := c.GetUser(int32(*senderUserID64))