test
This commit is contained in:
parent
b69c2877a9
commit
73c8b79fd5
1
mq.go
1
mq.go
@ -86,6 +86,7 @@ func MQReceiveMsgWorker(id int, cmd chan<- TGCommand) {
|
||||
err = json.Unmarshal(d.Body, &c)
|
||||
logOnError(err, "MQReceiveMsgWorker["+strconv.Itoa(id)+"] : Can't unmarshal.\n"+string(d.Body))
|
||||
if err == nil {
|
||||
log.Printf("****************************** New MQ message ******************************\n%s\n****************************************************************************\n", string(d.Body))
|
||||
cmd <- c
|
||||
}
|
||||
}
|
||||
|
2
td.go
2
td.go
@ -36,7 +36,7 @@ func ListenMQ(c *tdlib.Client, msgs <-chan TGCommand) {
|
||||
now = time.Now()
|
||||
}
|
||||
b, _ := json.Marshal(m)
|
||||
log.Printf("****************************** New MQ message ******************************\n%s\n****************************************************************************\n", string(b))
|
||||
log.Printf("****************************** New MQ command ******************************\n%s\n****************************************************************************\n", string(b))
|
||||
switch m.Type {
|
||||
case commandSendMsg:
|
||||
msgTxt := tdlib.NewInputMessageText(tdlib.NewFormattedText(m.Text, nil), true, true)
|
||||
|
Loading…
Reference in New Issue
Block a user