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