testtesttest
This commit is contained in:
parent
c79a99313d
commit
438337368e
17
td.go
17
td.go
@ -42,8 +42,25 @@ func ListenMQ(c *tdlib.Client, msgs <-chan TGCommand) {
|
||||
} else if m.ToUserID64 != 0 {
|
||||
c.SendMessage(m.ToUserID64, 0, false, false, nil, msgTxt)
|
||||
}
|
||||
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
|
||||
|
||||
r := ChatWarsMessage{
|
||||
UserID64: ownUserID64,
|
||||
SenderUserID64: int64(u.Message.SenderUserID),
|
||||
ID64: u.Message.ID,
|
||||
ChatID64: u.Message.ChatID,
|
||||
Text: txt,
|
||||
}
|
||||
|
||||
r.Date = time.Unix(int64(u.Message.Date), 0)
|
||||
|
||||
MQCWMsgQueue <- r
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user