From 1757e927f150dd76af12e375d9c5f62a4f283ade Mon Sep 17 00:00:00 2001 From: shoopea Date: Wed, 5 Feb 2020 12:52:11 +0800 Subject: [PATCH] test --- utils.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils.go b/utils.go index 536d440..7a411ae 100644 --- a/utils.go +++ b/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