This commit is contained in:
shoopea 2019-06-11 11:23:31 +08:00
parent 3e2407c3c9
commit 3a5d8d70a6

5
td.go
View File

@ -48,11 +48,12 @@ func ListenMQ(c *tdlib.Client, msgs <-chan TGCommand) {
case commandRefreshMsg: case commandRefreshMsg:
u, err := c.GetMessage(m.FromChatID64, m.FromMsgID64) u, err := c.GetMessage(m.FromChatID64, m.FromMsgID64)
logOnError(err, "ListenMQ : commandRefreshMsg") logOnError(err, "ListenMQ : commandRefreshMsg")
b, err := json.Marshal(u) /* b, err := json.Marshal(u)
logOnError(err, "ListenMQ : Marshal") logOnError(err, "ListenMQ : Marshal")
log.Printf("ListenMQ : commandRefreshMsg (%d - %d) :\n%s\n", m.FromChatID64, m.FromMsgID64, string(b)) log.Printf("ListenMQ : commandRefreshMsg (%d - %d) :\n%s\n", m.FromChatID64, m.FromMsgID64, string(b))
log.Printf("ListenMQ : commandRefreshMsg : Type : %s\n", u.Content.GetMessageContentEnum()) log.Printf("ListenMQ : commandRefreshMsg : Type : %s\n", u.Content.GetMessageContentEnum())
if err != nil && u.Content.GetMessageContentEnum() == tdlib.MessageTextType { */
if err == nil && u.Content.GetMessageContentEnum() == tdlib.MessageTextType {
txt := u.Content.(*tdlib.MessageText).Text.Text txt := u.Content.(*tdlib.MessageText).Text.Text
r := ChatWarsMessage{ r := ChatWarsMessage{