test
This commit is contained in:
parent
63adca3553
commit
1757e927f1
6
utils.go
6
utils.go
@ -19,7 +19,7 @@ func logOnError(err error, msg string) {
|
||||
}
|
||||
}
|
||||
|
||||
func unmarshalCallbackQueryPayload(rawMsg *json.RawMessage) (tdlib.CallbackQueryPayload, error) {
|
||||
func unmarshalCallbackQueryPayload(rawMsg []byte) (tdlib.CallbackQueryPayload, error) {
|
||||
|
||||
if rawMsg == nil {
|
||||
return nil, nil
|
||||
@ -32,12 +32,12 @@ func unmarshalCallbackQueryPayload(rawMsg *json.RawMessage) (tdlib.CallbackQuery
|
||||
|
||||
switch tdlib.CallbackQueryPayloadEnum(objMap["@type"].(string)) {
|
||||
case tdlib.CallbackQueryPayloadDataType:
|
||||
var callbackQueryPayloadData CallbackQueryPayloadData
|
||||
var callbackQueryPayloadData tdlib.CallbackQueryPayloadData
|
||||
err := json.Unmarshal(*rawMsg, &callbackQueryPayloadData)
|
||||
return &callbackQueryPayloadData, err
|
||||
|
||||
case tdlib.CallbackQueryPayloadGameType:
|
||||
var callbackQueryPayloadGame CallbackQueryPayloadGame
|
||||
var callbackQueryPayloadGame tdlib.CallbackQueryPayloadGame
|
||||
err := json.Unmarshal(*rawMsg, &callbackQueryPayloadGame)
|
||||
return &callbackQueryPayloadGame, err
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user