diff --git a/td.go b/td.go index 8b8d237..8962459 100644 --- a/td.go +++ b/td.go @@ -32,7 +32,7 @@ func ListenMe(c *tdlib.Client) { func ListenMQ(c *tdlib.Client, msgs <-chan TGCommand) { for m := range msgs { - b, _ := json.Marshal(m) + //b, _ := json.Marshal(m) //log.Printf("****************************** New MQ command ******************************\n%s\n****************************************************************************\n", string(b)) go clientMsg(c, m) } @@ -118,12 +118,11 @@ func ListenTest(c *tdlib.Client) { chatID := int64(updateMsg.Message.ChatID) userID := int64(updateMsg.Message.SenderUserID) forwardInfo := updateMsg.Message.ForwardInfo - for _, v := range cfg.Listen { - if chatID == 408101137 && userID == 408101137 && forwardInfo == nil { - return true - } + if chatID == 408101137 && userID == 408101137 && forwardInfo == nil { + return true + } else { + return false } - return false } receiver := c.AddEventReceiver(&tdlib.UpdateNewMessage{}, eventFilter, 100)