Merge pull request #99 from BjoernPetersen/fix_replay_typo
Fix replay/reply typo and deprecate old methods. Fixes #97
This commit is contained in:
commit
e911314925
@ -30,13 +30,13 @@ public class SendAudio {
|
|||||||
private Integer duration; ///< Integer Duration of the audio in seconds as defined by sender
|
private Integer duration; ///< Integer Duration of the audio in seconds as defined by sender
|
||||||
private String chatId; ///< Unique identifier for the chat to send the message to (or Username fro channels)
|
private String chatId; ///< Unique identifier for the chat to send the message to (or Username fro channels)
|
||||||
private String audio; ///< Audio file to send. file_id as String to resend an audio that is already on the Telegram servers
|
private String audio; ///< Audio file to send. file_id as String to resend an audio that is already on the Telegram servers
|
||||||
private Integer replayToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
private Integer replyToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
||||||
/**
|
/**
|
||||||
* Optional. Sends the message silently. iOS users will not receive a notification, Android
|
* Optional. Sends the message silently. iOS users will not receive a notification, Android
|
||||||
* users will receive a notification with no sound. Other apps coming soon
|
* users will receive a notification with no sound. Other apps coming soon
|
||||||
*/
|
*/
|
||||||
private Boolean disableNotification;
|
private Boolean disableNotification;
|
||||||
private ReplyKeyboard replayMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
private ReplyKeyboard replyMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
||||||
private String performer; ///< Optional. Performer of sent audio
|
private String performer; ///< Optional. Performer of sent audio
|
||||||
private String title; ///< Optional. Title of sent audio
|
private String title; ///< Optional. Title of sent audio
|
||||||
|
|
||||||
@ -117,22 +117,54 @@ public class SendAudio {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getReplyToMessageId() {
|
||||||
|
return replyToMessageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendAudio setReplyToMessageId(Integer replyToMessageId) {
|
||||||
|
this.replyToMessageId = replyToMessageId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReplyKeyboard getReplyMarkup() {
|
||||||
|
return replyMarkup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendAudio setReplyMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
this.replyMarkup = replyMarkup;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyToMessageId()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public Integer getReplayToMessageId() {
|
public Integer getReplayToMessageId() {
|
||||||
return replayToMessageId;
|
return getReplyToMessageId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendAudio setReplayToMessageId(Integer replayToMessageId) {
|
/**
|
||||||
this.replayToMessageId = replayToMessageId;
|
* @deprecated Use {@link #setReplyToMessageId(Integer)} instead.
|
||||||
return this;
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendAudio setReplayToMessageId(Integer replyToMessageId) {
|
||||||
|
return setReplyToMessageId(replyToMessageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyMarkup()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public ReplyKeyboard getReplayMarkup() {
|
public ReplyKeyboard getReplayMarkup() {
|
||||||
return replayMarkup;
|
return getReplyMarkup();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendAudio setReplayMarkup(ReplyKeyboard replayMarkup) {
|
/**
|
||||||
this.replayMarkup = replayMarkup;
|
* @deprecated Use {@link #setReplyMarkup(ReplyKeyboard)} instead.
|
||||||
return this;
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendAudio setReplayMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
return setReplyMarkup(replyMarkup);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPerformer() {
|
public String getPerformer() {
|
||||||
@ -188,8 +220,8 @@ public class SendAudio {
|
|||||||
return "SendAudio{" +
|
return "SendAudio{" +
|
||||||
"chatId='" + chatId + '\'' +
|
"chatId='" + chatId + '\'' +
|
||||||
", audio='" + audio + '\'' +
|
", audio='" + audio + '\'' +
|
||||||
", replayToMessageId=" + replayToMessageId +
|
", replyToMessageId=" + replyToMessageId +
|
||||||
", replayMarkup=" + replayMarkup +
|
", replyMarkup=" + replyMarkup +
|
||||||
", performer='" + performer + '\'' +
|
", performer='" + performer + '\'' +
|
||||||
", title='" + title + '\'' +
|
", title='" + title + '\'' +
|
||||||
", isNewAudio=" + isNewAudio +
|
", isNewAudio=" + isNewAudio +
|
||||||
|
@ -38,8 +38,8 @@ public class SendContact extends BotApiMethod<Message> {
|
|||||||
* users will receive a notification with no sound. Other apps coming soon
|
* users will receive a notification with no sound. Other apps coming soon
|
||||||
*/
|
*/
|
||||||
private Boolean disableNotification;
|
private Boolean disableNotification;
|
||||||
private Integer replayToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
private Integer replyToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
||||||
private ReplyKeyboard replayMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
private ReplyKeyboard replyMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
||||||
|
|
||||||
public String getChatId() {
|
public String getChatId() {
|
||||||
return chatId;
|
return chatId;
|
||||||
@ -50,22 +50,54 @@ public class SendContact extends BotApiMethod<Message> {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getReplyToMessageId() {
|
||||||
|
return replyToMessageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendContact setReplyToMessageId(Integer replyToMessageId) {
|
||||||
|
this.replyToMessageId = replyToMessageId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReplyKeyboard getReplyMarkup() {
|
||||||
|
return replyMarkup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendContact setReplyMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
this.replyMarkup = replyMarkup;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyToMessageId()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public Integer getReplayToMessageId() {
|
public Integer getReplayToMessageId() {
|
||||||
return replayToMessageId;
|
return getReplyToMessageId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendContact setReplayToMessageId(Integer replayToMessageId) {
|
/**
|
||||||
this.replayToMessageId = replayToMessageId;
|
* @deprecated Use {@link #setReplyToMessageId(Integer)} instead.
|
||||||
return this;
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendContact setReplayToMessageId(Integer replyToMessageId) {
|
||||||
|
return setReplyToMessageId(replyToMessageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyMarkup()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public ReplyKeyboard getReplayMarkup() {
|
public ReplyKeyboard getReplayMarkup() {
|
||||||
return replayMarkup;
|
return getReplyMarkup();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendContact setReplayMarkup(ReplyKeyboard replayMarkup) {
|
/**
|
||||||
this.replayMarkup = replayMarkup;
|
* @deprecated Use {@link #setReplyMarkup(ReplyKeyboard)} instead.
|
||||||
return this;
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendContact setReplayMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
return setReplyMarkup(replyMarkup);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getDisableNotification() {
|
public Boolean getDisableNotification() {
|
||||||
@ -134,11 +166,11 @@ public class SendContact extends BotApiMethod<Message> {
|
|||||||
if (disableNotification != null) {
|
if (disableNotification != null) {
|
||||||
jsonObject.put(DISABLENOTIFICATION_FIELD, disableNotification);
|
jsonObject.put(DISABLENOTIFICATION_FIELD, disableNotification);
|
||||||
}
|
}
|
||||||
if (replayToMessageId != null) {
|
if (replyToMessageId != null) {
|
||||||
jsonObject.put(REPLYTOMESSAGEID_FIELD, replayToMessageId);
|
jsonObject.put(REPLYTOMESSAGEID_FIELD, replyToMessageId);
|
||||||
}
|
}
|
||||||
if (replayMarkup != null) {
|
if (replyMarkup != null) {
|
||||||
jsonObject.put(REPLYMARKUP_FIELD, replayMarkup.toJson());
|
jsonObject.put(REPLYMARKUP_FIELD, replyMarkup.toJson());
|
||||||
}
|
}
|
||||||
|
|
||||||
return jsonObject;
|
return jsonObject;
|
||||||
@ -157,11 +189,11 @@ public class SendContact extends BotApiMethod<Message> {
|
|||||||
if (disableNotification != null) {
|
if (disableNotification != null) {
|
||||||
gen.writeBooleanField(DISABLENOTIFICATION_FIELD, disableNotification);
|
gen.writeBooleanField(DISABLENOTIFICATION_FIELD, disableNotification);
|
||||||
}
|
}
|
||||||
if (replayToMessageId != null) {
|
if (replyToMessageId != null) {
|
||||||
gen.writeNumberField(REPLYTOMESSAGEID_FIELD, replayToMessageId);
|
gen.writeNumberField(REPLYTOMESSAGEID_FIELD, replyToMessageId);
|
||||||
}
|
}
|
||||||
if (replayMarkup != null) {
|
if (replyMarkup != null) {
|
||||||
gen.writeObjectField(REPLYMARKUP_FIELD, replayMarkup);
|
gen.writeObjectField(REPLYMARKUP_FIELD, replyMarkup);
|
||||||
}
|
}
|
||||||
|
|
||||||
gen.writeEndObject();
|
gen.writeEndObject();
|
||||||
@ -180,8 +212,8 @@ public class SendContact extends BotApiMethod<Message> {
|
|||||||
", phoneNumber=" + phoneNumber +
|
", phoneNumber=" + phoneNumber +
|
||||||
", firstName=" + firstName +
|
", firstName=" + firstName +
|
||||||
", lastName=" + lastName +
|
", lastName=" + lastName +
|
||||||
", replayToMessageId=" + replayToMessageId +
|
", replyToMessageId=" + replyToMessageId +
|
||||||
", replayMarkup=" + replayMarkup +
|
", replyMarkup=" + replyMarkup +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,8 +28,8 @@ public class SendDocument {
|
|||||||
* users will receive a notification with no sound. Other apps coming soon
|
* users will receive a notification with no sound. Other apps coming soon
|
||||||
*/
|
*/
|
||||||
private Boolean disableNotification;
|
private Boolean disableNotification;
|
||||||
private Integer replayToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
private Integer replyToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
||||||
private ReplyKeyboard replayMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
private ReplyKeyboard replyMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
||||||
|
|
||||||
private boolean isNewDocument; ///< True to upload a new document, false to use a fileId
|
private boolean isNewDocument; ///< True to upload a new document, false to use a fileId
|
||||||
private String documentName;
|
private String documentName;
|
||||||
@ -120,15 +120,31 @@ public class SendDocument {
|
|||||||
return newDocumentStream;
|
return newDocumentStream;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getReplayToMessageId() {
|
public Integer getReplyToMessageId() {
|
||||||
return replayToMessageId;
|
return replyToMessageId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendDocument setReplayToMessageId(Integer replayToMessageId) {
|
public SendDocument setReplyToMessageId(Integer replyToMessageId) {
|
||||||
this.replayToMessageId = replayToMessageId;
|
this.replyToMessageId = replyToMessageId;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyToMessageId()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public Integer getReplayToMessageId() {
|
||||||
|
return getReplyToMessageId();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #setReplyToMessageId(Integer)} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendDocument setReplayToMessageId(Integer replyToMessageId) {
|
||||||
|
return setReplyToMessageId(replyToMessageId);
|
||||||
|
}
|
||||||
|
|
||||||
public Boolean getDisableNotification() {
|
public Boolean getDisableNotification() {
|
||||||
return disableNotification;
|
return disableNotification;
|
||||||
}
|
}
|
||||||
@ -152,22 +168,38 @@ public class SendDocument {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReplyKeyboard getReplayMarkup() {
|
public ReplyKeyboard getReplyMarkup() {
|
||||||
return replayMarkup;
|
return replyMarkup;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendDocument setReplayMarkup(ReplyKeyboard replayMarkup) {
|
public SendDocument setReplyMarkup(ReplyKeyboard replyMarkup) {
|
||||||
this.replayMarkup = replayMarkup;
|
this.replyMarkup = replyMarkup;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyMarkup()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public ReplyKeyboard getReplayMarkup() {
|
||||||
|
return getReplyMarkup();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #setReplyMarkup(ReplyKeyboard)} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendDocument setReplayMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
return setReplyMarkup(replyMarkup);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "SendDocument{" +
|
return "SendDocument{" +
|
||||||
"chatId='" + chatId + '\'' +
|
"chatId='" + chatId + '\'' +
|
||||||
", document='" + document + '\'' +
|
", document='" + document + '\'' +
|
||||||
", replayToMessageId=" + replayToMessageId +
|
", replyToMessageId=" + replyToMessageId +
|
||||||
", replayMarkup=" + replayMarkup +
|
", replyMarkup=" + replyMarkup +
|
||||||
", isNewDocument=" + isNewDocument +
|
", isNewDocument=" + isNewDocument +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
@ -35,8 +35,8 @@ public class SendLocation extends BotApiMethod<Message> {
|
|||||||
* users will receive a notification with no sound. Other apps coming soon
|
* users will receive a notification with no sound. Other apps coming soon
|
||||||
*/
|
*/
|
||||||
private Boolean disableNotification;
|
private Boolean disableNotification;
|
||||||
private Integer replayToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
private Integer replyToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
||||||
private ReplyKeyboard replayMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
private ReplyKeyboard replyMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
||||||
|
|
||||||
public String getChatId() {
|
public String getChatId() {
|
||||||
return chatId;
|
return chatId;
|
||||||
@ -65,22 +65,54 @@ public class SendLocation extends BotApiMethod<Message> {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getReplyToMessageId() {
|
||||||
|
return replyToMessageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendLocation setReplyToMessageId(Integer replyToMessageId) {
|
||||||
|
this.replyToMessageId = replyToMessageId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReplyKeyboard getReplyMarkup() {
|
||||||
|
return replyMarkup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendLocation setReplyMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
this.replyMarkup = replyMarkup;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyToMessageId()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public Integer getReplayToMessageId() {
|
public Integer getReplayToMessageId() {
|
||||||
return replayToMessageId;
|
return getReplyToMessageId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendLocation setReplayToMessageId(Integer replayToMessageId) {
|
/**
|
||||||
this.replayToMessageId = replayToMessageId;
|
* @deprecated Use {@link #setReplyToMessageId(Integer)} instead.
|
||||||
return this;
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendLocation setReplayToMessageId(Integer replyToMessageId) {
|
||||||
|
return setReplyToMessageId(replyToMessageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyMarkup()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public ReplyKeyboard getReplayMarkup() {
|
public ReplyKeyboard getReplayMarkup() {
|
||||||
return replayMarkup;
|
return getReplyMarkup();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendLocation setReplayMarkup(ReplyKeyboard replayMarkup) {
|
/**
|
||||||
this.replayMarkup = replayMarkup;
|
* @deprecated Use {@link #setReplyMarkup(ReplyKeyboard)} instead.
|
||||||
return this;
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendLocation setReplayMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
return setReplyMarkup(replyMarkup);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getDisableNotification() {
|
public Boolean getDisableNotification() {
|
||||||
@ -119,11 +151,11 @@ public class SendLocation extends BotApiMethod<Message> {
|
|||||||
if (disableNotification != null) {
|
if (disableNotification != null) {
|
||||||
jsonObject.put(DISABLENOTIFICATION_FIELD, disableNotification);
|
jsonObject.put(DISABLENOTIFICATION_FIELD, disableNotification);
|
||||||
}
|
}
|
||||||
if (replayToMessageId != null) {
|
if (replyToMessageId != null) {
|
||||||
jsonObject.put(REPLYTOMESSAGEID_FIELD, replayToMessageId);
|
jsonObject.put(REPLYTOMESSAGEID_FIELD, replyToMessageId);
|
||||||
}
|
}
|
||||||
if (replayMarkup != null) {
|
if (replyMarkup != null) {
|
||||||
jsonObject.put(REPLYMARKUP_FIELD, replayMarkup.toJson());
|
jsonObject.put(REPLYMARKUP_FIELD, replyMarkup.toJson());
|
||||||
}
|
}
|
||||||
|
|
||||||
return jsonObject;
|
return jsonObject;
|
||||||
@ -139,11 +171,11 @@ public class SendLocation extends BotApiMethod<Message> {
|
|||||||
if (disableNotification != null) {
|
if (disableNotification != null) {
|
||||||
gen.writeBooleanField(DISABLENOTIFICATION_FIELD, disableNotification);
|
gen.writeBooleanField(DISABLENOTIFICATION_FIELD, disableNotification);
|
||||||
}
|
}
|
||||||
if (replayToMessageId != null) {
|
if (replyToMessageId != null) {
|
||||||
gen.writeNumberField(REPLYTOMESSAGEID_FIELD, replayToMessageId);
|
gen.writeNumberField(REPLYTOMESSAGEID_FIELD, replyToMessageId);
|
||||||
}
|
}
|
||||||
if (replayMarkup != null) {
|
if (replyMarkup != null) {
|
||||||
gen.writeObjectField(REPLYMARKUP_FIELD, replayMarkup);
|
gen.writeObjectField(REPLYMARKUP_FIELD, replyMarkup);
|
||||||
}
|
}
|
||||||
|
|
||||||
gen.writeEndObject();
|
gen.writeEndObject();
|
||||||
@ -161,8 +193,8 @@ public class SendLocation extends BotApiMethod<Message> {
|
|||||||
"chatId='" + chatId + '\'' +
|
"chatId='" + chatId + '\'' +
|
||||||
", latitude=" + latitude +
|
", latitude=" + latitude +
|
||||||
", longitude=" + longitude +
|
", longitude=" + longitude +
|
||||||
", replayToMessageId=" + replayToMessageId +
|
", replyToMessageId=" + replyToMessageId +
|
||||||
", replayMarkup=" + replayMarkup +
|
", replyMarkup=" + replyMarkup +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,8 +38,8 @@ public class SendMessage extends BotApiMethod<Message> {
|
|||||||
* users will receive a notification with no sound. Other apps coming soon
|
* users will receive a notification with no sound. Other apps coming soon
|
||||||
*/
|
*/
|
||||||
private Boolean disableNotification;
|
private Boolean disableNotification;
|
||||||
private Integer replayToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
private Integer replyToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
||||||
private ReplyKeyboard replayMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
private ReplyKeyboard replyMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
||||||
|
|
||||||
public SendMessage() {
|
public SendMessage() {
|
||||||
super();
|
super();
|
||||||
@ -63,22 +63,54 @@ public class SendMessage extends BotApiMethod<Message> {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getReplyToMessageId() {
|
||||||
|
return replyToMessageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendMessage setReplyToMessageId(Integer replyToMessageId) {
|
||||||
|
this.replyToMessageId = replyToMessageId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReplyKeyboard getReplyMarkup() {
|
||||||
|
return replyMarkup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendMessage setReplyMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
this.replyMarkup = replyMarkup;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyToMessageId()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public Integer getReplayToMessageId() {
|
public Integer getReplayToMessageId() {
|
||||||
return replayToMessageId;
|
return getReplyToMessageId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendMessage setReplayToMessageId(Integer replayToMessageId) {
|
/**
|
||||||
this.replayToMessageId = replayToMessageId;
|
* @deprecated Use {@link #setReplyToMessageId(Integer)} instead.
|
||||||
return this;
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendMessage setReplayToMessageId(Integer replyToMessageId) {
|
||||||
|
return setReplyToMessageId(replyToMessageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyMarkup()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public ReplyKeyboard getReplayMarkup() {
|
public ReplyKeyboard getReplayMarkup() {
|
||||||
return replayMarkup;
|
return getReplyMarkup();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendMessage setReplayMarkup(ReplyKeyboard replayMarkup) {
|
/**
|
||||||
this.replayMarkup = replayMarkup;
|
* @deprecated Use {@link #setReplyMarkup(ReplyKeyboard)} instead.
|
||||||
return this;
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendMessage setReplayMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
return setReplyMarkup(replyMarkup);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getDisableWebPagePreview() {
|
public Boolean getDisableWebPagePreview() {
|
||||||
@ -141,11 +173,11 @@ public class SendMessage extends BotApiMethod<Message> {
|
|||||||
if (disableNotification != null) {
|
if (disableNotification != null) {
|
||||||
jsonObject.put(DISABLENOTIFICATION_FIELD, disableNotification);
|
jsonObject.put(DISABLENOTIFICATION_FIELD, disableNotification);
|
||||||
}
|
}
|
||||||
if (replayToMessageId != null) {
|
if (replyToMessageId != null) {
|
||||||
jsonObject.put(REPLYTOMESSAGEID_FIELD, replayToMessageId);
|
jsonObject.put(REPLYTOMESSAGEID_FIELD, replyToMessageId);
|
||||||
}
|
}
|
||||||
if (replayMarkup != null) {
|
if (replyMarkup != null) {
|
||||||
jsonObject.put(REPLYMARKUP_FIELD, replayMarkup.toJson());
|
jsonObject.put(REPLYMARKUP_FIELD, replyMarkup.toJson());
|
||||||
}
|
}
|
||||||
|
|
||||||
return jsonObject;
|
return jsonObject;
|
||||||
@ -180,11 +212,11 @@ public class SendMessage extends BotApiMethod<Message> {
|
|||||||
if (disableNotification != null) {
|
if (disableNotification != null) {
|
||||||
gen.writeBooleanField(DISABLENOTIFICATION_FIELD, disableNotification);
|
gen.writeBooleanField(DISABLENOTIFICATION_FIELD, disableNotification);
|
||||||
}
|
}
|
||||||
if (replayToMessageId != null) {
|
if (replyToMessageId != null) {
|
||||||
gen.writeNumberField(REPLYTOMESSAGEID_FIELD, replayToMessageId);
|
gen.writeNumberField(REPLYTOMESSAGEID_FIELD, replyToMessageId);
|
||||||
}
|
}
|
||||||
if (replayMarkup != null) {
|
if (replyMarkup != null) {
|
||||||
gen.writeObjectField(REPLYMARKUP_FIELD, replayMarkup);
|
gen.writeObjectField(REPLYMARKUP_FIELD, replyMarkup);
|
||||||
}
|
}
|
||||||
|
|
||||||
gen.writeEndObject();
|
gen.writeEndObject();
|
||||||
@ -203,8 +235,8 @@ public class SendMessage extends BotApiMethod<Message> {
|
|||||||
", text='" + text + '\'' +
|
", text='" + text + '\'' +
|
||||||
", parseMode='" + parseMode + '\'' +
|
", parseMode='" + parseMode + '\'' +
|
||||||
", disableWebPagePreview=" + disableWebPagePreview +
|
", disableWebPagePreview=" + disableWebPagePreview +
|
||||||
", replayToMessageId=" + replayToMessageId +
|
", replyToMessageId=" + replyToMessageId +
|
||||||
", replayMarkup=" + replayMarkup +
|
", replyMarkup=" + replyMarkup +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,8 +28,8 @@ public class SendPhoto {
|
|||||||
* users will receive a notification with no sound. Other apps coming soon
|
* users will receive a notification with no sound. Other apps coming soon
|
||||||
*/
|
*/
|
||||||
private Boolean disableNotification;
|
private Boolean disableNotification;
|
||||||
private Integer replayToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
private Integer replyToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
||||||
private ReplyKeyboard replayMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
private ReplyKeyboard replyMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
||||||
|
|
||||||
private boolean isNewPhoto; ///< True if the photo must be uploaded from a file, file if it is a fileId
|
private boolean isNewPhoto; ///< True if the photo must be uploaded from a file, file if it is a fileId
|
||||||
private String photoName; ///< Name of the photo
|
private String photoName; ///< Name of the photo
|
||||||
@ -68,22 +68,54 @@ public class SendPhoto {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getReplyToMessageId() {
|
||||||
|
return replyToMessageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendPhoto setReplyToMessageId(Integer replyToMessageId) {
|
||||||
|
this.replyToMessageId = replyToMessageId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReplyKeyboard getReplyMarkup() {
|
||||||
|
return replyMarkup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendPhoto setReplyMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
this.replyMarkup = replyMarkup;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyToMessageId()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public Integer getReplayToMessageId() {
|
public Integer getReplayToMessageId() {
|
||||||
return replayToMessageId;
|
return getReplyToMessageId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendPhoto setReplayToMessageId(Integer replayToMessageId) {
|
/**
|
||||||
this.replayToMessageId = replayToMessageId;
|
* @deprecated Use {@link #setReplyToMessageId(Integer)} instead.
|
||||||
return this;
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendPhoto setReplayToMessageId(Integer replyToMessageId) {
|
||||||
|
return setReplyToMessageId(replyToMessageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyMarkup()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public ReplyKeyboard getReplayMarkup() {
|
public ReplyKeyboard getReplayMarkup() {
|
||||||
return replayMarkup;
|
return getReplyMarkup();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendPhoto setReplayMarkup(ReplyKeyboard replayMarkup) {
|
/**
|
||||||
this.replayMarkup = replayMarkup;
|
* @deprecated Use {@link #setReplyMarkup(ReplyKeyboard)} instead.
|
||||||
return this;
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendPhoto setReplayMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
return setReplyMarkup(replyMarkup);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isNewPhoto() {
|
public boolean isNewPhoto() {
|
||||||
@ -151,8 +183,8 @@ public class SendPhoto {
|
|||||||
"chatId='" + chatId + '\'' +
|
"chatId='" + chatId + '\'' +
|
||||||
", photo='" + photo + '\'' +
|
", photo='" + photo + '\'' +
|
||||||
", caption='" + caption + '\'' +
|
", caption='" + caption + '\'' +
|
||||||
", replayToMessageId=" + replayToMessageId +
|
", replyToMessageId=" + replyToMessageId +
|
||||||
", replayMarkup=" + replayMarkup +
|
", replyMarkup=" + replyMarkup +
|
||||||
", isNewPhoto=" + isNewPhoto +
|
", isNewPhoto=" + isNewPhoto +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,8 @@ public class SendSticker {
|
|||||||
* users will receive a notification with no sound. Other apps coming soon
|
* users will receive a notification with no sound. Other apps coming soon
|
||||||
*/
|
*/
|
||||||
private Boolean disableNotification;
|
private Boolean disableNotification;
|
||||||
private Integer replayToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
private Integer replyToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
||||||
private ReplyKeyboard replayMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
private ReplyKeyboard replyMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
||||||
|
|
||||||
private boolean isNewSticker; ///< True to upload a new sticker, false to use a fileId
|
private boolean isNewSticker; ///< True to upload a new sticker, false to use a fileId
|
||||||
private String stickerName;
|
private String stickerName;
|
||||||
@ -57,22 +57,54 @@ public class SendSticker {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getReplyToMessageId() {
|
||||||
|
return replyToMessageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendSticker setReplyToMessageId(Integer replyToMessageId) {
|
||||||
|
this.replyToMessageId = replyToMessageId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReplyKeyboard getReplyMarkup() {
|
||||||
|
return replyMarkup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendSticker setReplyMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
this.replyMarkup = replyMarkup;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyToMessageId()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public Integer getReplayToMessageId() {
|
public Integer getReplayToMessageId() {
|
||||||
return replayToMessageId;
|
return getReplyToMessageId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendSticker setReplayToMessageId(Integer replayToMessageId) {
|
/**
|
||||||
this.replayToMessageId = replayToMessageId;
|
* @deprecated Use {@link #setReplyToMessageId(Integer)} instead.
|
||||||
return this;
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendSticker setReplayToMessageId(Integer replyToMessageId) {
|
||||||
|
return setReplyToMessageId(replyToMessageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyMarkup()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public ReplyKeyboard getReplayMarkup() {
|
public ReplyKeyboard getReplayMarkup() {
|
||||||
return replayMarkup;
|
return getReplyMarkup();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendSticker setReplayMarkup(ReplyKeyboard replayMarkup) {
|
/**
|
||||||
this.replayMarkup = replayMarkup;
|
* @deprecated Use {@link #setReplyMarkup(ReplyKeyboard)} instead.
|
||||||
return this;
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendSticker setReplayMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
return setReplyMarkup(replyMarkup);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -139,8 +171,8 @@ public class SendSticker {
|
|||||||
return "SendSticker{" +
|
return "SendSticker{" +
|
||||||
"chatId='" + chatId + '\'' +
|
"chatId='" + chatId + '\'' +
|
||||||
", sticker='" + sticker + '\'' +
|
", sticker='" + sticker + '\'' +
|
||||||
", replayToMessageId=" + replayToMessageId +
|
", replyToMessageId=" + replyToMessageId +
|
||||||
", replayMarkup=" + replayMarkup +
|
", replyMarkup=" + replyMarkup +
|
||||||
", isNewSticker=" + isNewSticker +
|
", isNewSticker=" + isNewSticker +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
@ -42,8 +42,8 @@ public class SendVenue extends BotApiMethod<Message> {
|
|||||||
private Boolean disableNotification;
|
private Boolean disableNotification;
|
||||||
private String address; ///< Address of the venue
|
private String address; ///< Address of the venue
|
||||||
private String foursquareId; ///< Optional. Foursquare identifier of the venue
|
private String foursquareId; ///< Optional. Foursquare identifier of the venue
|
||||||
private Integer replayToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
private Integer replyToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
||||||
private ReplyKeyboard replayMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
private ReplyKeyboard replyMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
||||||
|
|
||||||
public String getChatId() {
|
public String getChatId() {
|
||||||
return chatId;
|
return chatId;
|
||||||
@ -72,22 +72,54 @@ public class SendVenue extends BotApiMethod<Message> {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getReplyToMessageId() {
|
||||||
|
return replyToMessageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendVenue setReplyToMessageId(Integer replyToMessageId) {
|
||||||
|
this.replyToMessageId = replyToMessageId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReplyKeyboard getReplyMarkup() {
|
||||||
|
return replyMarkup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendVenue setReplyMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
this.replyMarkup = replyMarkup;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyToMessageId()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public Integer getReplayToMessageId() {
|
public Integer getReplayToMessageId() {
|
||||||
return replayToMessageId;
|
return getReplyToMessageId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendVenue setReplayToMessageId(Integer replayToMessageId) {
|
/**
|
||||||
this.replayToMessageId = replayToMessageId;
|
* @deprecated Use {@link #setReplyToMessageId(Integer)} instead.
|
||||||
return this;
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendVenue setReplayToMessageId(Integer replyToMessageId) {
|
||||||
|
return setReplyToMessageId(replyToMessageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyMarkup()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public ReplyKeyboard getReplayMarkup() {
|
public ReplyKeyboard getReplayMarkup() {
|
||||||
return replayMarkup;
|
return getReplyMarkup();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendVenue setReplayMarkup(ReplyKeyboard replayMarkup) {
|
/**
|
||||||
this.replayMarkup = replayMarkup;
|
* @deprecated Use {@link #setReplyMarkup(ReplyKeyboard)} instead.
|
||||||
return this;
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendVenue setReplayMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
return setReplyMarkup(replyMarkup);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getDisableNotification() {
|
public Boolean getDisableNotification() {
|
||||||
@ -158,11 +190,11 @@ public class SendVenue extends BotApiMethod<Message> {
|
|||||||
if (disableNotification != null) {
|
if (disableNotification != null) {
|
||||||
jsonObject.put(DISABLENOTIFICATION_FIELD, disableNotification);
|
jsonObject.put(DISABLENOTIFICATION_FIELD, disableNotification);
|
||||||
}
|
}
|
||||||
if (replayToMessageId != null) {
|
if (replyToMessageId != null) {
|
||||||
jsonObject.put(REPLYTOMESSAGEID_FIELD, replayToMessageId);
|
jsonObject.put(REPLYTOMESSAGEID_FIELD, replyToMessageId);
|
||||||
}
|
}
|
||||||
if (replayMarkup != null) {
|
if (replyMarkup != null) {
|
||||||
jsonObject.put(REPLYMARKUP_FIELD, replayMarkup.toJson());
|
jsonObject.put(REPLYMARKUP_FIELD, replyMarkup.toJson());
|
||||||
}
|
}
|
||||||
|
|
||||||
return jsonObject;
|
return jsonObject;
|
||||||
@ -183,11 +215,11 @@ public class SendVenue extends BotApiMethod<Message> {
|
|||||||
if (disableNotification != null) {
|
if (disableNotification != null) {
|
||||||
gen.writeBooleanField(DISABLENOTIFICATION_FIELD, disableNotification);
|
gen.writeBooleanField(DISABLENOTIFICATION_FIELD, disableNotification);
|
||||||
}
|
}
|
||||||
if (replayToMessageId != null) {
|
if (replyToMessageId != null) {
|
||||||
gen.writeNumberField(REPLYTOMESSAGEID_FIELD, replayToMessageId);
|
gen.writeNumberField(REPLYTOMESSAGEID_FIELD, replyToMessageId);
|
||||||
}
|
}
|
||||||
if (replayMarkup != null) {
|
if (replyMarkup != null) {
|
||||||
gen.writeObjectField(REPLYMARKUP_FIELD, replayMarkup);
|
gen.writeObjectField(REPLYMARKUP_FIELD, replyMarkup);
|
||||||
}
|
}
|
||||||
|
|
||||||
gen.writeEndObject();
|
gen.writeEndObject();
|
||||||
@ -208,8 +240,8 @@ public class SendVenue extends BotApiMethod<Message> {
|
|||||||
", title=" + title +
|
", title=" + title +
|
||||||
", address=" + address +
|
", address=" + address +
|
||||||
", foursquareId=" + foursquareId +
|
", foursquareId=" + foursquareId +
|
||||||
", replayToMessageId=" + replayToMessageId +
|
", replyToMessageId=" + replyToMessageId +
|
||||||
", replayMarkup=" + replayMarkup +
|
", replyMarkup=" + replyMarkup +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,8 +35,8 @@ public class SendVideo {
|
|||||||
* users will receive a notification with no sound. Other apps coming soon
|
* users will receive a notification with no sound. Other apps coming soon
|
||||||
*/
|
*/
|
||||||
private Boolean disableNotification;
|
private Boolean disableNotification;
|
||||||
private Integer replayToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
private Integer replyToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
||||||
private ReplyKeyboard replayMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
private ReplyKeyboard replyMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
||||||
|
|
||||||
private boolean isNewVideo; ///< True to upload a new video, false to use a fileId
|
private boolean isNewVideo; ///< True to upload a new video, false to use a fileId
|
||||||
private String videoName; ///< Name of the video
|
private String videoName; ///< Name of the video
|
||||||
@ -84,22 +84,54 @@ public class SendVideo {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getReplyToMessageId() {
|
||||||
|
return replyToMessageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendVideo setReplyToMessageId(Integer replyToMessageId) {
|
||||||
|
this.replyToMessageId = replyToMessageId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReplyKeyboard getReplyMarkup() {
|
||||||
|
return replyMarkup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendVideo setReplyMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
this.replyMarkup = replyMarkup;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyToMessageId()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public Integer getReplayToMessageId() {
|
public Integer getReplayToMessageId() {
|
||||||
return replayToMessageId;
|
return getReplyToMessageId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendVideo setReplayToMessageId(Integer replayToMessageId) {
|
/**
|
||||||
this.replayToMessageId = replayToMessageId;
|
* @deprecated Use {@link #setReplyToMessageId(Integer)} instead.
|
||||||
return this;
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendVideo setReplayToMessageId(Integer replyToMessageId) {
|
||||||
|
return setReplyToMessageId(replyToMessageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyMarkup()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public ReplyKeyboard getReplayMarkup() {
|
public ReplyKeyboard getReplayMarkup() {
|
||||||
return replayMarkup;
|
return getReplyMarkup();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendVideo setReplayMarkup(ReplyKeyboard replayMarkup) {
|
/**
|
||||||
this.replayMarkup = replayMarkup;
|
* @deprecated Use {@link #setReplyMarkup(ReplyKeyboard)} instead.
|
||||||
return this;
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendVideo setReplayMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
return setReplyMarkup(replyMarkup);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isNewVideo() {
|
public boolean isNewVideo() {
|
||||||
@ -186,8 +218,8 @@ public class SendVideo {
|
|||||||
", video='" + video + '\'' +
|
", video='" + video + '\'' +
|
||||||
", duration=" + duration +
|
", duration=" + duration +
|
||||||
", caption='" + caption + '\'' +
|
", caption='" + caption + '\'' +
|
||||||
", replayToMessageId=" + replayToMessageId +
|
", replyToMessageId=" + replyToMessageId +
|
||||||
", replayMarkup=" + replayMarkup +
|
", replyMarkup=" + replyMarkup +
|
||||||
", isNewVideo=" + isNewVideo +
|
", isNewVideo=" + isNewVideo +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
|
@ -30,8 +30,8 @@ public class SendVoice {
|
|||||||
* users will receive a notification with no sound. Other apps coming soon
|
* users will receive a notification with no sound. Other apps coming soon
|
||||||
*/
|
*/
|
||||||
private Boolean disableNotification;
|
private Boolean disableNotification;
|
||||||
private Integer replayToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
private Integer replyToMessageId; ///< Optional. If the message is a reply, ID of the original message
|
||||||
private ReplyKeyboard replayMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
private ReplyKeyboard replyMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard
|
||||||
private Integer duration; ///< Optional. Duration of sent audio in seconds
|
private Integer duration; ///< Optional. Duration of sent audio in seconds
|
||||||
|
|
||||||
private boolean isNewVoice; ///< True to upload a new voice note, false to use a fileId
|
private boolean isNewVoice; ///< True to upload a new voice note, false to use a fileId
|
||||||
@ -48,8 +48,8 @@ public class SendVoice {
|
|||||||
return "SendVoice{" +
|
return "SendVoice{" +
|
||||||
"chatId='" + chatId + '\'' +
|
"chatId='" + chatId + '\'' +
|
||||||
", voice='" + voice + '\'' +
|
", voice='" + voice + '\'' +
|
||||||
", replayToMessageId=" + replayToMessageId +
|
", replyToMessageId=" + replyToMessageId +
|
||||||
", replayMarkup=" + replayMarkup +
|
", replyMarkup=" + replyMarkup +
|
||||||
", duration=" + duration +
|
", duration=" + duration +
|
||||||
'}';
|
'}';
|
||||||
}
|
}
|
||||||
@ -150,22 +150,54 @@ public class SendVoice {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getReplyToMessageId() {
|
||||||
|
return replyToMessageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendVoice setReplyToMessageId(Integer replyToMessageId) {
|
||||||
|
this.replyToMessageId = replyToMessageId;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReplyKeyboard getReplyMarkup() {
|
||||||
|
return replyMarkup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SendVoice setReplyMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
this.replyMarkup = replyMarkup;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyToMessageId()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public Integer getReplayToMessageId() {
|
public Integer getReplayToMessageId() {
|
||||||
return replayToMessageId;
|
return getReplyToMessageId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendVoice setReplayToMessageId(Integer replayToMessageId) {
|
/**
|
||||||
this.replayToMessageId = replayToMessageId;
|
* @deprecated Use {@link #setReplyToMessageId(Integer)} instead.
|
||||||
return this;
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendVoice setReplayToMessageId(Integer replyToMessageId) {
|
||||||
|
return setReplyToMessageId(replyToMessageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link #getReplyMarkup()} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public ReplyKeyboard getReplayMarkup() {
|
public ReplyKeyboard getReplayMarkup() {
|
||||||
return replayMarkup;
|
return getReplyMarkup();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SendVoice setReplayMarkup(ReplyKeyboard replayMarkup) {
|
/**
|
||||||
this.replayMarkup = replayMarkup;
|
* @deprecated Use {@link #setReplyMarkup(ReplyKeyboard)} instead.
|
||||||
return this;
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public SendVoice setReplayMarkup(ReplyKeyboard replyMarkup) {
|
||||||
|
return setReplyMarkup(replyMarkup);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getDuration() {
|
public Integer getDuration() {
|
||||||
|
@ -511,11 +511,11 @@ public abstract class AbsSender {
|
|||||||
} else {
|
} else {
|
||||||
builder.addBinaryBody(SendDocument.DOCUMENT_FIELD, new java.io.File(sendDocument.getDocument()), ContentType.APPLICATION_OCTET_STREAM, sendDocument.getDocumentName());
|
builder.addBinaryBody(SendDocument.DOCUMENT_FIELD, new java.io.File(sendDocument.getDocument()), ContentType.APPLICATION_OCTET_STREAM, sendDocument.getDocumentName());
|
||||||
}
|
}
|
||||||
if (sendDocument.getReplayMarkup() != null) {
|
if (sendDocument.getReplyMarkup() != null) {
|
||||||
builder.addTextBody(SendDocument.REPLYMARKUP_FIELD, sendDocument.getReplayMarkup().toJson().toString(), TEXT_PLAIN_CONTENT_TYPE);
|
builder.addTextBody(SendDocument.REPLYMARKUP_FIELD, sendDocument.getReplyMarkup().toJson().toString(), TEXT_PLAIN_CONTENT_TYPE);
|
||||||
}
|
}
|
||||||
if (sendDocument.getReplayToMessageId() != null) {
|
if (sendDocument.getReplyToMessageId() != null) {
|
||||||
builder.addTextBody(SendDocument.REPLYTOMESSAGEID_FIELD, sendDocument.getReplayToMessageId().toString());
|
builder.addTextBody(SendDocument.REPLYTOMESSAGEID_FIELD, sendDocument.getReplyToMessageId().toString());
|
||||||
}
|
}
|
||||||
if (sendDocument.getCaption() != null) {
|
if (sendDocument.getCaption() != null) {
|
||||||
builder.addTextBody(SendDocument.CAPTION_FIELD, sendDocument.getCaption(), TEXT_PLAIN_CONTENT_TYPE);
|
builder.addTextBody(SendDocument.CAPTION_FIELD, sendDocument.getCaption(), TEXT_PLAIN_CONTENT_TYPE);
|
||||||
@ -529,16 +529,16 @@ public abstract class AbsSender {
|
|||||||
List<NameValuePair> nameValuePairs = new ArrayList<>();
|
List<NameValuePair> nameValuePairs = new ArrayList<>();
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendDocument.CHATID_FIELD, sendDocument.getChatId()));
|
nameValuePairs.add(new BasicNameValuePair(SendDocument.CHATID_FIELD, sendDocument.getChatId()));
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendDocument.DOCUMENT_FIELD, sendDocument.getDocument()));
|
nameValuePairs.add(new BasicNameValuePair(SendDocument.DOCUMENT_FIELD, sendDocument.getDocument()));
|
||||||
if (sendDocument.getReplayMarkup() != null) {
|
if (sendDocument.getReplyMarkup() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendDocument.REPLYMARKUP_FIELD, sendDocument.getReplayMarkup().toJson().toString()));
|
nameValuePairs.add(new BasicNameValuePair(SendDocument.REPLYMARKUP_FIELD, sendDocument.getReplyMarkup().toJson().toString()));
|
||||||
}
|
}
|
||||||
if (sendDocument.getReplayToMessageId() != null) {
|
if (sendDocument.getReplyToMessageId() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendDocument.REPLYTOMESSAGEID_FIELD, sendDocument.getReplayToMessageId().toString()));
|
nameValuePairs.add(new BasicNameValuePair(SendDocument.REPLYTOMESSAGEID_FIELD, sendDocument.getReplyToMessageId().toString()));
|
||||||
}
|
}
|
||||||
if (sendDocument.getCaption() != null) {
|
if (sendDocument.getCaption() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendDocument.CAPTION_FIELD, sendDocument.getCaption()));
|
nameValuePairs.add(new BasicNameValuePair(SendDocument.CAPTION_FIELD, sendDocument.getCaption()));
|
||||||
}
|
}
|
||||||
if (sendDocument.getReplayToMessageId() != null) {
|
if (sendDocument.getReplyToMessageId() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendDocument.DISABLENOTIFICATION_FIELD, sendDocument.getDisableNotification().toString()));
|
nameValuePairs.add(new BasicNameValuePair(SendDocument.DISABLENOTIFICATION_FIELD, sendDocument.getDisableNotification().toString()));
|
||||||
}
|
}
|
||||||
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs, StandardCharsets.UTF_8));
|
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs, StandardCharsets.UTF_8));
|
||||||
@ -577,11 +577,11 @@ public abstract class AbsSender {
|
|||||||
} else {
|
} else {
|
||||||
builder.addBinaryBody(SendPhoto.PHOTO_FIELD, new java.io.File(sendPhoto.getPhoto()), ContentType.APPLICATION_OCTET_STREAM, sendPhoto.getPhotoName());
|
builder.addBinaryBody(SendPhoto.PHOTO_FIELD, new java.io.File(sendPhoto.getPhoto()), ContentType.APPLICATION_OCTET_STREAM, sendPhoto.getPhotoName());
|
||||||
}
|
}
|
||||||
if (sendPhoto.getReplayMarkup() != null) {
|
if (sendPhoto.getReplyMarkup() != null) {
|
||||||
builder.addTextBody(SendPhoto.REPLYMARKUP_FIELD, sendPhoto.getReplayMarkup().toJson().toString(), TEXT_PLAIN_CONTENT_TYPE);
|
builder.addTextBody(SendPhoto.REPLYMARKUP_FIELD, sendPhoto.getReplyMarkup().toJson().toString(), TEXT_PLAIN_CONTENT_TYPE);
|
||||||
}
|
}
|
||||||
if (sendPhoto.getReplayToMessageId() != null) {
|
if (sendPhoto.getReplyToMessageId() != null) {
|
||||||
builder.addTextBody(SendPhoto.REPLYTOMESSAGEID_FIELD, sendPhoto.getReplayToMessageId().toString());
|
builder.addTextBody(SendPhoto.REPLYTOMESSAGEID_FIELD, sendPhoto.getReplyToMessageId().toString());
|
||||||
}
|
}
|
||||||
if (sendPhoto.getCaption() != null) {
|
if (sendPhoto.getCaption() != null) {
|
||||||
builder.addTextBody(SendPhoto.CAPTION_FIELD, sendPhoto.getCaption(), TEXT_PLAIN_CONTENT_TYPE);
|
builder.addTextBody(SendPhoto.CAPTION_FIELD, sendPhoto.getCaption(), TEXT_PLAIN_CONTENT_TYPE);
|
||||||
@ -595,11 +595,11 @@ public abstract class AbsSender {
|
|||||||
List<NameValuePair> nameValuePairs = new ArrayList<>();
|
List<NameValuePair> nameValuePairs = new ArrayList<>();
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendPhoto.CHATID_FIELD, sendPhoto.getChatId()));
|
nameValuePairs.add(new BasicNameValuePair(SendPhoto.CHATID_FIELD, sendPhoto.getChatId()));
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendPhoto.PHOTO_FIELD, sendPhoto.getPhoto()));
|
nameValuePairs.add(new BasicNameValuePair(SendPhoto.PHOTO_FIELD, sendPhoto.getPhoto()));
|
||||||
if (sendPhoto.getReplayMarkup() != null) {
|
if (sendPhoto.getReplyMarkup() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendPhoto.REPLYMARKUP_FIELD, sendPhoto.getReplayMarkup().toJson().toString()));
|
nameValuePairs.add(new BasicNameValuePair(SendPhoto.REPLYMARKUP_FIELD, sendPhoto.getReplyMarkup().toJson().toString()));
|
||||||
}
|
}
|
||||||
if (sendPhoto.getReplayToMessageId() != null) {
|
if (sendPhoto.getReplyToMessageId() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendPhoto.REPLYTOMESSAGEID_FIELD, sendPhoto.getReplayToMessageId().toString()));
|
nameValuePairs.add(new BasicNameValuePair(SendPhoto.REPLYTOMESSAGEID_FIELD, sendPhoto.getReplyToMessageId().toString()));
|
||||||
}
|
}
|
||||||
if (sendPhoto.getCaption() != null) {
|
if (sendPhoto.getCaption() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendPhoto.CAPTION_FIELD, sendPhoto.getCaption()));
|
nameValuePairs.add(new BasicNameValuePair(SendPhoto.CAPTION_FIELD, sendPhoto.getCaption()));
|
||||||
@ -643,11 +643,11 @@ public abstract class AbsSender {
|
|||||||
} else {
|
} else {
|
||||||
builder.addBinaryBody(SendVideo.VIDEO_FIELD, new java.io.File(sendVideo.getVideo()), ContentType.APPLICATION_OCTET_STREAM, sendVideo.getVideoName());
|
builder.addBinaryBody(SendVideo.VIDEO_FIELD, new java.io.File(sendVideo.getVideo()), ContentType.APPLICATION_OCTET_STREAM, sendVideo.getVideoName());
|
||||||
}
|
}
|
||||||
if (sendVideo.getReplayMarkup() != null) {
|
if (sendVideo.getReplyMarkup() != null) {
|
||||||
builder.addTextBody(SendVideo.REPLYMARKUP_FIELD, sendVideo.getReplayMarkup().toJson().toString(), TEXT_PLAIN_CONTENT_TYPE);
|
builder.addTextBody(SendVideo.REPLYMARKUP_FIELD, sendVideo.getReplyMarkup().toJson().toString(), TEXT_PLAIN_CONTENT_TYPE);
|
||||||
}
|
}
|
||||||
if (sendVideo.getReplayToMessageId() != null) {
|
if (sendVideo.getReplyToMessageId() != null) {
|
||||||
builder.addTextBody(SendVideo.REPLYTOMESSAGEID_FIELD, sendVideo.getReplayToMessageId().toString());
|
builder.addTextBody(SendVideo.REPLYTOMESSAGEID_FIELD, sendVideo.getReplyToMessageId().toString());
|
||||||
}
|
}
|
||||||
if (sendVideo.getCaption() != null) {
|
if (sendVideo.getCaption() != null) {
|
||||||
builder.addTextBody(SendVideo.CAPTION_FIELD, sendVideo.getCaption(), TEXT_PLAIN_CONTENT_TYPE);
|
builder.addTextBody(SendVideo.CAPTION_FIELD, sendVideo.getCaption(), TEXT_PLAIN_CONTENT_TYPE);
|
||||||
@ -670,11 +670,11 @@ public abstract class AbsSender {
|
|||||||
List<NameValuePair> nameValuePairs = new ArrayList<>();
|
List<NameValuePair> nameValuePairs = new ArrayList<>();
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendVideo.CHATID_FIELD, sendVideo.getChatId()));
|
nameValuePairs.add(new BasicNameValuePair(SendVideo.CHATID_FIELD, sendVideo.getChatId()));
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendVideo.VIDEO_FIELD, sendVideo.getVideo()));
|
nameValuePairs.add(new BasicNameValuePair(SendVideo.VIDEO_FIELD, sendVideo.getVideo()));
|
||||||
if (sendVideo.getReplayMarkup() != null) {
|
if (sendVideo.getReplyMarkup() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendVideo.REPLYMARKUP_FIELD, sendVideo.getReplayMarkup().toJson().toString()));
|
nameValuePairs.add(new BasicNameValuePair(SendVideo.REPLYMARKUP_FIELD, sendVideo.getReplyMarkup().toJson().toString()));
|
||||||
}
|
}
|
||||||
if (sendVideo.getReplayToMessageId() != null) {
|
if (sendVideo.getReplyToMessageId() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendVideo.REPLYTOMESSAGEID_FIELD, sendVideo.getReplayToMessageId().toString()));
|
nameValuePairs.add(new BasicNameValuePair(SendVideo.REPLYTOMESSAGEID_FIELD, sendVideo.getReplyToMessageId().toString()));
|
||||||
}
|
}
|
||||||
if (sendVideo.getCaption() != null) {
|
if (sendVideo.getCaption() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendVideo.CAPTION_FIELD, sendVideo.getCaption()));
|
nameValuePairs.add(new BasicNameValuePair(SendVideo.CAPTION_FIELD, sendVideo.getCaption()));
|
||||||
@ -728,11 +728,11 @@ public abstract class AbsSender {
|
|||||||
} else {
|
} else {
|
||||||
builder.addBinaryBody(SendSticker.STICKER_FIELD, new java.io.File(sendSticker.getSticker()), ContentType.APPLICATION_OCTET_STREAM, sendSticker.getStickerName());
|
builder.addBinaryBody(SendSticker.STICKER_FIELD, new java.io.File(sendSticker.getSticker()), ContentType.APPLICATION_OCTET_STREAM, sendSticker.getStickerName());
|
||||||
}
|
}
|
||||||
if (sendSticker.getReplayMarkup() != null) {
|
if (sendSticker.getReplyMarkup() != null) {
|
||||||
builder.addTextBody(SendSticker.REPLYMARKUP_FIELD, sendSticker.getReplayMarkup().toJson().toString(), TEXT_PLAIN_CONTENT_TYPE);
|
builder.addTextBody(SendSticker.REPLYMARKUP_FIELD, sendSticker.getReplyMarkup().toJson().toString(), TEXT_PLAIN_CONTENT_TYPE);
|
||||||
}
|
}
|
||||||
if (sendSticker.getReplayToMessageId() != null) {
|
if (sendSticker.getReplyToMessageId() != null) {
|
||||||
builder.addTextBody(SendSticker.REPLYTOMESSAGEID_FIELD, sendSticker.getReplayToMessageId().toString());
|
builder.addTextBody(SendSticker.REPLYTOMESSAGEID_FIELD, sendSticker.getReplyToMessageId().toString());
|
||||||
}
|
}
|
||||||
if (sendSticker.getDisableNotification() != null) {
|
if (sendSticker.getDisableNotification() != null) {
|
||||||
builder.addTextBody(SendSticker.DISABLENOTIFICATION_FIELD, sendSticker.getDisableNotification().toString());
|
builder.addTextBody(SendSticker.DISABLENOTIFICATION_FIELD, sendSticker.getDisableNotification().toString());
|
||||||
@ -743,11 +743,11 @@ public abstract class AbsSender {
|
|||||||
List<NameValuePair> nameValuePairs = new ArrayList<>();
|
List<NameValuePair> nameValuePairs = new ArrayList<>();
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendSticker.CHATID_FIELD, sendSticker.getChatId()));
|
nameValuePairs.add(new BasicNameValuePair(SendSticker.CHATID_FIELD, sendSticker.getChatId()));
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendSticker.STICKER_FIELD, sendSticker.getSticker()));
|
nameValuePairs.add(new BasicNameValuePair(SendSticker.STICKER_FIELD, sendSticker.getSticker()));
|
||||||
if (sendSticker.getReplayMarkup() != null) {
|
if (sendSticker.getReplyMarkup() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendSticker.REPLYMARKUP_FIELD, sendSticker.getReplayMarkup().toJson().toString()));
|
nameValuePairs.add(new BasicNameValuePair(SendSticker.REPLYMARKUP_FIELD, sendSticker.getReplyMarkup().toJson().toString()));
|
||||||
}
|
}
|
||||||
if (sendSticker.getReplayToMessageId() != null) {
|
if (sendSticker.getReplyToMessageId() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendSticker.REPLYTOMESSAGEID_FIELD, sendSticker.getReplayToMessageId().toString()));
|
nameValuePairs.add(new BasicNameValuePair(SendSticker.REPLYTOMESSAGEID_FIELD, sendSticker.getReplyToMessageId().toString()));
|
||||||
}
|
}
|
||||||
if (sendSticker.getDisableNotification() != null) {
|
if (sendSticker.getDisableNotification() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendSticker.DISABLENOTIFICATION_FIELD, sendSticker.getDisableNotification().toString()));
|
nameValuePairs.add(new BasicNameValuePair(SendSticker.DISABLENOTIFICATION_FIELD, sendSticker.getDisableNotification().toString()));
|
||||||
@ -796,11 +796,11 @@ public abstract class AbsSender {
|
|||||||
} else {
|
} else {
|
||||||
builder.addBinaryBody(SendAudio.AUDIO_FIELD, new java.io.File(sendAudio.getAudio()), ContentType.create("audio/mpeg"), sendAudio.getAudioName());
|
builder.addBinaryBody(SendAudio.AUDIO_FIELD, new java.io.File(sendAudio.getAudio()), ContentType.create("audio/mpeg"), sendAudio.getAudioName());
|
||||||
}
|
}
|
||||||
if (sendAudio.getReplayMarkup() != null) {
|
if (sendAudio.getReplyMarkup() != null) {
|
||||||
builder.addTextBody(SendAudio.REPLYMARKUP_FIELD, sendAudio.getReplayMarkup().toJson().toString(), TEXT_PLAIN_CONTENT_TYPE);
|
builder.addTextBody(SendAudio.REPLYMARKUP_FIELD, sendAudio.getReplyMarkup().toJson().toString(), TEXT_PLAIN_CONTENT_TYPE);
|
||||||
}
|
}
|
||||||
if (sendAudio.getReplayToMessageId() != null) {
|
if (sendAudio.getReplyToMessageId() != null) {
|
||||||
builder.addTextBody(SendAudio.REPLYTOMESSAGEID_FIELD, sendAudio.getReplayToMessageId().toString());
|
builder.addTextBody(SendAudio.REPLYTOMESSAGEID_FIELD, sendAudio.getReplyToMessageId().toString());
|
||||||
}
|
}
|
||||||
if (sendAudio.getPerformer() != null) {
|
if (sendAudio.getPerformer() != null) {
|
||||||
builder.addTextBody(SendAudio.PERFOMER_FIELD, sendAudio.getPerformer());
|
builder.addTextBody(SendAudio.PERFOMER_FIELD, sendAudio.getPerformer());
|
||||||
@ -820,11 +820,11 @@ public abstract class AbsSender {
|
|||||||
List<NameValuePair> nameValuePairs = new ArrayList<>();
|
List<NameValuePair> nameValuePairs = new ArrayList<>();
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendAudio.CHATID_FIELD, sendAudio.getChatId()));
|
nameValuePairs.add(new BasicNameValuePair(SendAudio.CHATID_FIELD, sendAudio.getChatId()));
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendAudio.AUDIO_FIELD, sendAudio.getAudio()));
|
nameValuePairs.add(new BasicNameValuePair(SendAudio.AUDIO_FIELD, sendAudio.getAudio()));
|
||||||
if (sendAudio.getReplayMarkup() != null) {
|
if (sendAudio.getReplyMarkup() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendAudio.REPLYMARKUP_FIELD, sendAudio.getReplayMarkup().toJson().toString()));
|
nameValuePairs.add(new BasicNameValuePair(SendAudio.REPLYMARKUP_FIELD, sendAudio.getReplyMarkup().toJson().toString()));
|
||||||
}
|
}
|
||||||
if (sendAudio.getReplayToMessageId() != null) {
|
if (sendAudio.getReplyToMessageId() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendAudio.REPLYTOMESSAGEID_FIELD, sendAudio.getReplayToMessageId().toString()));
|
nameValuePairs.add(new BasicNameValuePair(SendAudio.REPLYTOMESSAGEID_FIELD, sendAudio.getReplyToMessageId().toString()));
|
||||||
}
|
}
|
||||||
if (sendAudio.getPerformer() != null) {
|
if (sendAudio.getPerformer() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendAudio.PERFOMER_FIELD, sendAudio.getPerformer()));
|
nameValuePairs.add(new BasicNameValuePair(SendAudio.PERFOMER_FIELD, sendAudio.getPerformer()));
|
||||||
@ -885,11 +885,11 @@ public abstract class AbsSender {
|
|||||||
} else {
|
} else {
|
||||||
builder.addBinaryBody(SendVoice.VOICE_FIELD, new java.io.File(sendVoice.getVoice()), ContentType.create("audio/ogg"), sendVoice.getVoiceName());
|
builder.addBinaryBody(SendVoice.VOICE_FIELD, new java.io.File(sendVoice.getVoice()), ContentType.create("audio/ogg"), sendVoice.getVoiceName());
|
||||||
}
|
}
|
||||||
if (sendVoice.getReplayMarkup() != null) {
|
if (sendVoice.getReplyMarkup() != null) {
|
||||||
builder.addTextBody(SendVoice.REPLYMARKUP_FIELD, sendVoice.getReplayMarkup().toJson().toString(), TEXT_PLAIN_CONTENT_TYPE);
|
builder.addTextBody(SendVoice.REPLYMARKUP_FIELD, sendVoice.getReplyMarkup().toJson().toString(), TEXT_PLAIN_CONTENT_TYPE);
|
||||||
}
|
}
|
||||||
if (sendVoice.getReplayToMessageId() != null) {
|
if (sendVoice.getReplyToMessageId() != null) {
|
||||||
builder.addTextBody(SendVoice.REPLYTOMESSAGEID_FIELD, sendVoice.getReplayToMessageId().toString());
|
builder.addTextBody(SendVoice.REPLYTOMESSAGEID_FIELD, sendVoice.getReplyToMessageId().toString());
|
||||||
}
|
}
|
||||||
if (sendVoice.getDisableNotification() != null) {
|
if (sendVoice.getDisableNotification() != null) {
|
||||||
builder.addTextBody(SendVoice.DISABLENOTIFICATION_FIELD, sendVoice.getDisableNotification().toString());
|
builder.addTextBody(SendVoice.DISABLENOTIFICATION_FIELD, sendVoice.getDisableNotification().toString());
|
||||||
@ -903,11 +903,11 @@ public abstract class AbsSender {
|
|||||||
List<NameValuePair> nameValuePairs = new ArrayList<>();
|
List<NameValuePair> nameValuePairs = new ArrayList<>();
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendVoice.CHATID_FIELD, sendVoice.getChatId()));
|
nameValuePairs.add(new BasicNameValuePair(SendVoice.CHATID_FIELD, sendVoice.getChatId()));
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendVoice.VOICE_FIELD, sendVoice.getVoice()));
|
nameValuePairs.add(new BasicNameValuePair(SendVoice.VOICE_FIELD, sendVoice.getVoice()));
|
||||||
if (sendVoice.getReplayMarkup() != null) {
|
if (sendVoice.getReplyMarkup() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendVoice.REPLYMARKUP_FIELD, sendVoice.getReplayMarkup().toJson().toString()));
|
nameValuePairs.add(new BasicNameValuePair(SendVoice.REPLYMARKUP_FIELD, sendVoice.getReplyMarkup().toJson().toString()));
|
||||||
}
|
}
|
||||||
if (sendVoice.getReplayToMessageId() != null) {
|
if (sendVoice.getReplyToMessageId() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendVoice.REPLYTOMESSAGEID_FIELD, sendVoice.getReplayToMessageId().toString()));
|
nameValuePairs.add(new BasicNameValuePair(SendVoice.REPLYTOMESSAGEID_FIELD, sendVoice.getReplyToMessageId().toString()));
|
||||||
}
|
}
|
||||||
if (sendVoice.getDisableNotification() != null) {
|
if (sendVoice.getDisableNotification() != null) {
|
||||||
nameValuePairs.add(new BasicNameValuePair(SendVoice.DISABLENOTIFICATION_FIELD, sendVoice.getDisableNotification().toString()));
|
nameValuePairs.add(new BasicNameValuePair(SendVoice.DISABLENOTIFICATION_FIELD, sendVoice.getDisableNotification().toString()));
|
||||||
|
Loading…
Reference in New Issue
Block a user