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); + } }