Merge branch 'antonu17-fix_response_creation' into dev

This commit is contained in:
Rubenlagus 2016-05-05 21:25:17 +02:00
commit f92a4616b1

View File

@ -435,7 +435,7 @@ public abstract class AbsSender {
throw new TelegramApiException("Error at sendDocument", jsonObject.getString("description"));
}
return new Message(jsonObject);
return new Message(jsonObject.getJSONObject(Constants.RESPONSEFIELDRESULT));
}
public Message sendPhoto(SendPhoto sendPhoto) throws TelegramApiException {
@ -494,7 +494,7 @@ public abstract class AbsSender {
throw new TelegramApiException("Error at sendPhoto", jsonObject.getString("description"));
}
return new Message(jsonObject);
return new Message(jsonObject.getJSONObject(Constants.RESPONSEFIELDRESULT));
}
public Message sendVideo(SendVideo sendVideo) throws TelegramApiException {
@ -571,7 +571,7 @@ public abstract class AbsSender {
throw new TelegramApiException("Error at sendVideo", jsonObject.getString("description"));
}
return new Message(jsonObject);
return new Message(jsonObject.getJSONObject(Constants.RESPONSEFIELDRESULT));
}
public Message sendSticker(SendSticker sendSticker) throws TelegramApiException {
@ -625,7 +625,7 @@ public abstract class AbsSender {
throw new TelegramApiException("Error at sendSticker", jsonObject.getString("description"));
}
return new Message(jsonObject);
return new Message(jsonObject.getJSONObject(Constants.RESPONSEFIELDRESULT));
}
/**
@ -775,7 +775,7 @@ public abstract class AbsSender {
throw new TelegramApiException("Error at sendVoice", jsonObject.getString("description"));
}
return new Message(jsonObject);
return new Message(jsonObject.getJSONObject(Constants.RESPONSEFIELDRESULT));
}
// Simplified methods