diff --git a/pom.xml b/pom.xml
index 5aad8867..34af5279 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
jar
org.telegram
telegrambots
- 2.1
+ 2.1.1-SNAPSHOT
Telegram Bots
Easy to use library to create Telegram Bots
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultArticle.java b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultArticle.java
index bb08b6ec..65ff5849 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultArticle.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultArticle.java
@@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
-
import org.json.JSONObject;
import org.telegram.telegrambots.api.objects.inlinequery.inputmessagecontent.InputMessageContent;
import org.telegram.telegrambots.api.objects.replykeyboard.InlineKeyboardMarkup;
@@ -154,9 +153,9 @@ public class InlineQueryResultArticle implements InlineQueryResult {
jsonObject.put(TYPE_FIELD, this.type);
jsonObject.put(ID_FIELD, this.id);
jsonObject.put(TITLE_FIELD, this.title);
- jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent);
+ jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent.toJson());
if (replyMarkup != null) {
- jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup);
+ jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup.toJson());
}
if (url != null) {
jsonObject.put(URL_FIELD, this.url);
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultAudio.java b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultAudio.java
index 6cb5fc91..4ac6d0a8 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultAudio.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultAudio.java
@@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
-
import org.json.JSONObject;
import org.telegram.telegrambots.api.objects.inlinequery.inputmessagecontent.InputMessageContent;
import org.telegram.telegrambots.api.objects.replykeyboard.InlineKeyboardMarkup;
@@ -132,10 +131,10 @@ public class InlineQueryResultAudio implements InlineQueryResult {
jsonObject.put(AUDIO_DURATION_FIELD, audioDuration);
}
if (replyMarkup != null) {
- jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup);
+ jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup.toJson());
}
if (inputMessageContent != null) {
- jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent);
+ jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent.toJson());
}
return jsonObject;
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultContact.java b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultContact.java
index 78ee36e3..63e36f62 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultContact.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultContact.java
@@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
-
import org.json.JSONObject;
import org.telegram.telegrambots.api.objects.inlinequery.inputmessagecontent.InputMessageContent;
import org.telegram.telegrambots.api.objects.replykeyboard.InlineKeyboardMarkup;
@@ -150,10 +149,10 @@ public class InlineQueryResultContact implements InlineQueryResult {
jsonObject.put(LAST_NAME_FIELD, lastName);
}
if (replyMarkup != null) {
- jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup);
+ jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup.toJson());
}
if (inputMessageContent != null) {
- jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent);
+ jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent.toJson());
}
if (thumbUrl != null) {
jsonObject.put(THUMBURL_FIELD, this.thumbUrl);
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultDocument.java b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultDocument.java
index 74f1a6cf..1634265f 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultDocument.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultDocument.java
@@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
-
import org.json.JSONObject;
import org.telegram.telegrambots.api.objects.inlinequery.inputmessagecontent.InputMessageContent;
import org.telegram.telegrambots.api.objects.replykeyboard.InlineKeyboardMarkup;
@@ -179,10 +178,10 @@ public class InlineQueryResultDocument implements InlineQueryResult {
jsonObject.put(CAPTION_FIELD, caption);
}
if (replyMarkup != null) {
- jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup);
+ jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup.toJson());
}
if (inputMessageContent != null) {
- jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent);
+ jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent.toJson());
}
if (thumbUrl != null) {
jsonObject.put(THUMBURL_FIELD, this.thumbUrl);
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultGif.java b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultGif.java
index 217d0c22..cd09d6e7 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultGif.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultGif.java
@@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
-
import org.json.JSONObject;
import org.telegram.telegrambots.api.objects.inlinequery.inputmessagecontent.InputMessageContent;
import org.telegram.telegrambots.api.objects.replykeyboard.InlineKeyboardMarkup;
@@ -159,10 +158,10 @@ public class InlineQueryResultGif implements InlineQueryResult {
jsonObject.put(CAPTION_FIELD, this.caption);
}
if (replyMarkup != null) {
- jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup);
+ jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup.toJson());
}
if (inputMessageContent != null) {
- jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent);
+ jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent.toJson());
}
return jsonObject;
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultLocation.java b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultLocation.java
index bc5fbc86..7f4ddd93 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultLocation.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultLocation.java
@@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
-
import org.json.JSONObject;
import org.telegram.telegrambots.api.objects.inlinequery.inputmessagecontent.InputMessageContent;
import org.telegram.telegrambots.api.objects.replykeyboard.InlineKeyboardMarkup;
@@ -148,10 +147,10 @@ public class InlineQueryResultLocation implements InlineQueryResult {
jsonObject.put(TITLE_FIELD, title);
jsonObject.put(LONGITUDE_FIELD, longitude);
if (replyMarkup != null) {
- jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup);
+ jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup.toJson());
}
if (inputMessageContent != null) {
- jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent);
+ jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent.toJson());
}
if (thumbUrl != null) {
jsonObject.put(THUMBURL_FIELD, this.thumbUrl);
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultMpeg4Gif.java b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultMpeg4Gif.java
index f9486568..ae5e2f03 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultMpeg4Gif.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultMpeg4Gif.java
@@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
-
import org.json.JSONObject;
import org.telegram.telegrambots.api.objects.inlinequery.inputmessagecontent.InputMessageContent;
import org.telegram.telegrambots.api.objects.replykeyboard.InlineKeyboardMarkup;
@@ -141,7 +140,7 @@ public class InlineQueryResultMpeg4Gif implements InlineQueryResult {
public JSONObject toJson() {
JSONObject jsonObject = new JSONObject();
- jsonObject.put(TYPE_FIELD, this.type);
+ jsonObject.put(TYPE_FIELD, type);
jsonObject.put(ID_FIELD, this.id);
jsonObject.put(MPEG4URL_FIELD, this.mpeg4Url);
if (mpeg4Width != null) {
@@ -160,10 +159,10 @@ public class InlineQueryResultMpeg4Gif implements InlineQueryResult {
jsonObject.put(CAPTION_FIELD, this.caption);
}
if (replyMarkup != null) {
- jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup);
+ jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup.toJson());
}
if (inputMessageContent != null) {
- jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent);
+ jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent.toJson());
}
return jsonObject;
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultPhoto.java b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultPhoto.java
index 4ce4af90..6b9ef17c 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultPhoto.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultPhoto.java
@@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
-
import org.json.JSONObject;
import org.telegram.telegrambots.api.objects.inlinequery.inputmessagecontent.InputMessageContent;
import org.telegram.telegrambots.api.objects.replykeyboard.InlineKeyboardMarkup;
@@ -190,10 +189,10 @@ public class InlineQueryResultPhoto implements InlineQueryResult {
jsonObject.put(CAPTION_FIELD, this.caption);
}
if (replyMarkup != null) {
- jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup);
+ jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup.toJson());
}
if (inputMessageContent != null) {
- jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent);
+ jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent.toJson());
}
return jsonObject;
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultVenue.java b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultVenue.java
index b99feb7d..ed087c11 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultVenue.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultVenue.java
@@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
-
import org.json.JSONObject;
import org.telegram.telegrambots.api.objects.inlinequery.inputmessagecontent.InputMessageContent;
import org.telegram.telegrambots.api.objects.replykeyboard.InlineKeyboardMarkup;
@@ -175,10 +174,10 @@ public class InlineQueryResultVenue implements InlineQueryResult {
jsonObject.put(FOURSQUARE_ID_FIELD, foursquareId);
}
if (replyMarkup != null) {
- jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup);
+ jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup.toJson());
}
if (inputMessageContent != null) {
- jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent);
+ jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent.toJson());
}
if (thumbUrl != null) {
jsonObject.put(THUMBURL_FIELD, this.thumbUrl);
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultVideo.java b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultVideo.java
index 3f6a3022..5d6b0b80 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultVideo.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultVideo.java
@@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
-
import org.json.JSONObject;
import org.telegram.telegrambots.api.objects.inlinequery.inputmessagecontent.InputMessageContent;
import org.telegram.telegrambots.api.objects.replykeyboard.InlineKeyboardMarkup;
@@ -205,10 +204,10 @@ public class InlineQueryResultVideo implements InlineQueryResult {
jsonObject.put(CAPTION_FIELD, caption);
}
if (replyMarkup != null) {
- jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup);
+ jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup.toJson());
}
if (inputMessageContent != null) {
- jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent);
+ jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent.toJson());
}
return jsonObject;
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultVoice.java b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultVoice.java
index 31631028..d90f3acb 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultVoice.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/inlinequery/result/InlineQueryResultVoice.java
@@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
-
import org.json.JSONObject;
import org.telegram.telegrambots.api.objects.inlinequery.inputmessagecontent.InputMessageContent;
import org.telegram.telegrambots.api.objects.replykeyboard.InlineKeyboardMarkup;
@@ -116,10 +115,10 @@ public class InlineQueryResultVoice implements InlineQueryResult {
jsonObject.put(VOICE_DURATION_FIELD, voiceDuration);
}
if (replyMarkup != null) {
- jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup);
+ jsonObject.put(REPLY_MARKUP_FIELD, replyMarkup.toJson());
}
if (inputMessageContent != null) {
- jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent);
+ jsonObject.put(INPUTMESSAGECONTENT_FIELD, inputMessageContent.toJson());
}
return jsonObject;
}