diff --git a/src/main/java/org/telegram/telegrambots/api/methods/send/SendPhoto.java b/src/main/java/org/telegram/telegrambots/api/methods/send/SendPhoto.java index e1059aa0..fcb59daa 100644 --- a/src/main/java/org/telegram/telegrambots/api/methods/send/SendPhoto.java +++ b/src/main/java/org/telegram/telegrambots/api/methods/send/SendPhoto.java @@ -13,7 +13,7 @@ public class SendPhoto { public static final String CHATID_FIELD = "chat_id"; public static final String PHOTO_FIELD = "photo"; - public static final String CAPTION_FIELD = "photo"; + public static final String CAPTION_FIELD = "caption"; public static final String DISABLENOTIFICATION_FIELD = "disable_notification"; public static final String REPLYTOMESSAGEID_FIELD = "reply_to_message_id"; public static final String REPLYMARKUP_FIELD = "reply_markup"; diff --git a/src/main/java/org/telegram/telegrambots/bots/AbsSender.java b/src/main/java/org/telegram/telegrambots/bots/AbsSender.java index 74eac9cc..703bc816 100644 --- a/src/main/java/org/telegram/telegrambots/bots/AbsSender.java +++ b/src/main/java/org/telegram/telegrambots/bots/AbsSender.java @@ -510,7 +510,7 @@ public abstract class AbsSender { builder.addTextBody(SendDocument.REPLYTOMESSAGEID_FIELD, sendDocument.getReplayToMessageId().toString()); } if (sendDocument.getCaption() != null) { - builder.addTextBody(SendDocument.CAPTION_FIELD, sendDocument.getCaption()); + builder.addTextBody(SendDocument.CAPTION_FIELD, sendDocument.getCaption(), ContentType.create("text/plain", StandardCharsets.UTF_8)); } if (sendDocument.getDisableNotification() != null) { builder.addTextBody(SendDocument.DISABLENOTIFICATION_FIELD, sendDocument.getDisableNotification().toString()); @@ -570,7 +570,7 @@ public abstract class AbsSender { builder.addTextBody(SendPhoto.REPLYTOMESSAGEID_FIELD, sendPhoto.getReplayToMessageId().toString()); } if (sendPhoto.getCaption() != null) { - builder.addTextBody(SendPhoto.CAPTION_FIELD, sendPhoto.getCaption()); + builder.addTextBody(SendPhoto.CAPTION_FIELD, sendPhoto.getCaption(), ContentType.create("text/plain", StandardCharsets.UTF_8)); } if (sendPhoto.getDisableNotification() != null) { builder.addTextBody(SendPhoto.DISABLENOTIFICATION_FIELD, sendPhoto.getDisableNotification().toString()); @@ -630,7 +630,7 @@ public abstract class AbsSender { builder.addTextBody(SendVideo.REPLYTOMESSAGEID_FIELD, sendVideo.getReplayToMessageId().toString()); } if (sendVideo.getCaption() != null) { - builder.addTextBody(SendVideo.CAPTION_FIELD, sendVideo.getCaption()); + builder.addTextBody(SendVideo.CAPTION_FIELD, sendVideo.getCaption(), ContentType.create("text/plain", StandardCharsets.UTF_8)); } if (sendVideo.getDuration() != null) { builder.addTextBody(SendVideo.DURATION_FIELD, sendVideo.getDuration().toString());