From bc61bd2d3a8e30d924b9ece132931e26a7bbb86b Mon Sep 17 00:00:00 2001 From: shoopea Date: Sun, 9 Jun 2019 23:56:26 +0800 Subject: [PATCH] test --- td.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/td.go b/td.go index 3ea4e4e..f2a33a2 100644 --- a/td.go +++ b/td.go @@ -45,18 +45,18 @@ func ListenMQ(c *tdlib.Client, msgs <-chan TGCommand) { case commandRefreshMsg: u, err := c.GetMessage(m.FromChatID64, m.FromMsgID64) logOnError(err, "ListenMQ : commandRefreshMsg") - if err != nil && u.Message.Content.GetMessageContentEnum() == tdlib.MessageTextType { - txt := u.Message.Content.(*tdlib.MessageText).Text.Text + if err != nil && u.Content.GetMessageContentEnum() == tdlib.MessageTextType { + txt := u.Content.(*tdlib.MessageText).Text.Text r := ChatWarsMessage{ UserID64: ownUserID64, - SenderUserID64: int64(u.Message.SenderUserID), - ID64: u.Message.ID, - ChatID64: u.Message.ChatID, + SenderUserID64: int64(u.SenderUserID), + ID64: u.ID, + ChatID64: u.ChatID, Text: txt, } - r.Date = time.Unix(int64(u.Message.Date), 0) + r.Date = time.Unix(int64(u.Date), 0) MQCWMsgQueue <- r }