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