Merge pull request #544 from aNNiMON/maskposition-fix

Fix wrong type in Sticker maskPosition field
This commit is contained in:
Ruben Bermudez 2018-12-11 00:50:25 +00:00 committed by GitHub
commit f7bde89ec8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,7 @@
package org.telegram.telegrambots.meta.api.objects.stickers; package org.telegram.telegrambots.meta.api.objects.stickers;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import org.telegram.telegrambots.meta.api.interfaces.InputBotApiObject; import org.telegram.telegrambots.meta.api.interfaces.InputBotApiObject;
import org.telegram.telegrambots.meta.api.interfaces.Validable; import org.telegram.telegrambots.meta.api.interfaces.Validable;
import org.telegram.telegrambots.meta.exceptions.TelegramApiValidationException; import org.telegram.telegrambots.meta.exceptions.TelegramApiValidationException;
@ -10,6 +11,7 @@ import org.telegram.telegrambots.meta.exceptions.TelegramApiValidationException;
* @version 3.2 * @version 3.2
* This object describes the position on faces where a mask should be placed by default. * This object describes the position on faces where a mask should be placed by default.
*/ */
@JsonTypeInfo(use=JsonTypeInfo.Id.NONE)
public class MaskPosition implements InputBotApiObject, Validable { public class MaskPosition implements InputBotApiObject, Validable {
private static final String POINT_FIELD = "point"; private static final String POINT_FIELD = "point";
private static final String XSHIFT_FIELD = "x_shift"; private static final String XSHIFT_FIELD = "x_shift";

View File

@ -36,7 +36,7 @@ public class Sticker implements BotApiObject {
@JsonProperty(SETNAME_FIELD) @JsonProperty(SETNAME_FIELD)
private String setName; ///< Optional. Name of the sticker set to which the sticker belongs private String setName; ///< Optional. Name of the sticker set to which the sticker belongs
@JsonProperty(MASKPOSITON_FIELD) @JsonProperty(MASKPOSITON_FIELD)
private String maskPosition; ///< Optional. For mask stickers, the position where the mask should be placed private MaskPosition maskPosition; ///< Optional. For mask stickers, the position where the mask should be placed
public Sticker() { public Sticker() {
super(); super();
@ -70,7 +70,7 @@ public class Sticker implements BotApiObject {
return setName; return setName;
} }
public String getMaskPosition() { public MaskPosition getMaskPosition() {
return maskPosition; return maskPosition;
} }
@ -84,7 +84,7 @@ public class Sticker implements BotApiObject {
", fileSize=" + fileSize + ", fileSize=" + fileSize +
", emoji='" + emoji + '\'' + ", emoji='" + emoji + '\'' +
", setName='" + setName + '\'' + ", setName='" + setName + '\'' +
", maskPosition='" + maskPosition + '\'' + ", maskPosition=" + maskPosition +
'}'; '}';
} }
} }