This commit is contained in:
shoopea 2020-02-05 12:47:08 +08:00
parent 40b5f870dc
commit 86fec4550c

14
td.go
View File

@ -296,16 +296,16 @@ func clientMsg(c *tdlib.Client, m TGCommand) {
MQCWMsgQueue <- r MQCWMsgQueue <- r
} }
case commandCallback: case commandCallback:
p := tdlib.NewCallbackQueryPayloadData(m.CallbackData) d := tdlib.NewCallbackQueryPayloadData(m.CallbackData)
b, _ := json.Marshal(p) b, _ := json.Marshal(p)
log.Printf("CallbackQueryPayloadData :\n%s\n", string(b)) log.Printf("CallbackQueryPayloadData :\n%s\n", string(b))
log.Printf("Type : %s\n", p.GetCallbackQueryPayloadEnum()) log.Printf("Type : %s\n", p.GetCallbackQueryPayloadEnum())
/* p, err := tdlib.unmarshalCallbackQueryPayload(b)
a, err := c.GetCallbackQueryAnswer(m.FromChatID64, m.FromMsgID64, p)
logOnError(err, "clientMsg : GetCallbackQueryAnswer") a, err := c.GetCallbackQueryAnswer(m.FromChatID64, m.FromMsgID64, p)
b, _ := json.Marshal(a) logOnError(err, "clientMsg : GetCallbackQueryAnswer")
log.Printf("GetCallbackQueryAnswer :\n%s\n", string(b)) b, _ = json.Marshal(a)
*/ log.Printf("GetCallbackQueryAnswer :\n%s\n", string(b))
default: default:
log.Printf("clientMsg : No handler for command %d.\n", m.Type) log.Printf("clientMsg : No handler for command %d.\n", m.Type)
} }