fix var
This commit is contained in:
parent
20da68c06c
commit
1914f82276
7
td.go
7
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,13 +118,12 @@ 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
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
receiver := c.AddEventReceiver(&tdlib.UpdateNewMessage{}, eventFilter, 100)
|
||||
for newMsg := range receiver.Chan {
|
||||
|
Loading…
Reference in New Issue
Block a user