From 0c82af27724b6b038faf5eb90158dc9a01228b22 Mon Sep 17 00:00:00 2001 From: ruben Date: Mon, 1 Apr 2024 13:36:41 +0100 Subject: [PATCH] Fix #1316 --- .../objects/inlinequery/result/InlineQueryResultDocument.java | 3 --- .../api/objects/inlinequery/result/InlineQueryResultVideo.java | 3 --- 2 files changed, 6 deletions(-) diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/inlinequery/result/InlineQueryResultDocument.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/inlinequery/result/InlineQueryResultDocument.java index 38eadadfb..c596fce30 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/inlinequery/result/InlineQueryResultDocument.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/inlinequery/result/InlineQueryResultDocument.java @@ -107,9 +107,6 @@ public void validate() throws TelegramApiValidationException { if (parseMode != null && (captionEntities != null && !captionEntities.isEmpty()) ) { throw new TelegramApiValidationException("Parse mode can't be enabled if Entities are provided", this); } - if (thumbnailUrl != null && !"image/jpeg".equalsIgnoreCase(thumbnailUrl)) { - throw new TelegramApiValidationException("Thumbnail Url must be JPEG", this); - } if (inputMessageContent != null) { inputMessageContent.validate(); } diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/inlinequery/result/InlineQueryResultVideo.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/inlinequery/result/InlineQueryResultVideo.java index cb3645ce7..421a093b5 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/inlinequery/result/InlineQueryResultVideo.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/inlinequery/result/InlineQueryResultVideo.java @@ -99,9 +99,6 @@ public void validate() throws TelegramApiValidationException { if (parseMode != null && (captionEntities != null && !captionEntities.isEmpty()) ) { throw new TelegramApiValidationException("Parse mode can't be enabled if Entities are provided", this); } - if (thumbnailUrl != null && !"image/jpeg".equalsIgnoreCase(thumbnailUrl)) { - throw new TelegramApiValidationException("Thumbnail Url must be JPEG", this); - } if (inputMessageContent != null) { inputMessageContent.validate(); }