From 2bc07613bbfcdfc0246aa455fbbf4ca6deb95204 Mon Sep 17 00:00:00 2001 From: Ruben Bermudez Date: Thu, 9 Aug 2018 02:01:46 +0200 Subject: [PATCH] Closes #499 --- .../meta/api/objects/media/InputMediaSerializer.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/media/InputMediaSerializer.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/media/InputMediaSerializer.java index 16e46a80..77f8fdb3 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/media/InputMediaSerializer.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/media/InputMediaSerializer.java @@ -3,6 +3,7 @@ package org.telegram.telegrambots.meta.api.objects.media; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.jsontype.TypeSerializer; import java.io.IOException; @@ -79,4 +80,9 @@ public class InputMediaSerializer extends JsonSerializer { gen.writeEndObject(); } + + @Override + public void serializeWithType(InputMedia value, JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException { + serialize(value, gen, serializers); + } }