testtest
This commit is contained in:
parent
f2bac0aef4
commit
385be7f14c
10
td.go
10
td.go
@ -156,9 +156,12 @@ func getHistory(c *tdlib.Client) {
|
||||
MsgID64: msg.ID,
|
||||
}
|
||||
|
||||
b, _ := json.Marshal(m)
|
||||
b, err := json.Marshal(m)
|
||||
if err != nil {
|
||||
logOnError(err, "getHistory : Marshaling message.")
|
||||
}
|
||||
|
||||
_ = ch.Publish(
|
||||
err = ch.Publish(
|
||||
"", // exchange
|
||||
q.Name, // routing key
|
||||
false, // mandatory
|
||||
@ -167,6 +170,9 @@ func getHistory(c *tdlib.Client) {
|
||||
ContentType: "application/json",
|
||||
Body: []byte(b),
|
||||
})
|
||||
if err != nil {
|
||||
logOnError(err, "getHistory : Publishing message.")
|
||||
}
|
||||
if msg.ID < lastMsgID64 {
|
||||
lastMsgID64 = msg.ID
|
||||
lastMsgTime = time.Unix(int64(msg.Date), 0)
|
||||
|
Loading…
Reference in New Issue
Block a user