This commit is contained in:
shoopea 2019-12-12 11:17:46 +08:00
parent 10c5e08418
commit 470f44eae0

10
td.go
View File

@ -67,10 +67,20 @@ func ListenTG(c *tdlib.Client) {
ID64: updateMsg.Message.ID,
ChatID64: updateMsg.Message.ChatID,
Text: txt,
Callbacks: nil,
}
m.Date = time.Unix(int64(updateMsg.Message.Date), 0)
if updateMsg.Message.ReplyMarkup != nil {
if updateMsg.Message.ReplyMarkup.GetReplyMarkupEnum() == tdlib.ReplyMarkupInlineKeyboardType {
rm := updateMsg.Message.ReplayMarkup.(*tdlib.ReplyMarkupInlineKeyboard)
for k, v := range rm.Rows {
fmt.Println("ReplyMarkupInlineKeyboard[%s][%s] : ", k, v.text)
}
}
}
lastChatMsgMux.RLock()
if _, ok := lastChatTDMsg[m.ChatID64]; !ok {
lastChatMsgMux.RUnlock()