test
This commit is contained in:
parent
438337368e
commit
bc61bd2d3a
12
td.go
12
td.go
@ -45,18 +45,18 @@ 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")
|
||||||
if err != nil && u.Message.Content.GetMessageContentEnum() == tdlib.MessageTextType {
|
if err != nil && u.Content.GetMessageContentEnum() == tdlib.MessageTextType {
|
||||||
txt := u.Message.Content.(*tdlib.MessageText).Text.Text
|
txt := u.Content.(*tdlib.MessageText).Text.Text
|
||||||
|
|
||||||
r := ChatWarsMessage{
|
r := ChatWarsMessage{
|
||||||
UserID64: ownUserID64,
|
UserID64: ownUserID64,
|
||||||
SenderUserID64: int64(u.Message.SenderUserID),
|
SenderUserID64: int64(u.SenderUserID),
|
||||||
ID64: u.Message.ID,
|
ID64: u.ID,
|
||||||
ChatID64: u.Message.ChatID,
|
ChatID64: u.ChatID,
|
||||||
Text: txt,
|
Text: txt,
|
||||||
}
|
}
|
||||||
|
|
||||||
r.Date = time.Unix(int64(u.Message.Date), 0)
|
r.Date = time.Unix(int64(u.Date), 0)
|
||||||
|
|
||||||
MQCWMsgQueue <- r
|
MQCWMsgQueue <- r
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user