Merge pull request #22 from a2mz/master

fix Class cast exception
This commit is contained in:
Ruben Bermudez 2016-04-09 15:02:50 +02:00
commit 684fbf609a

View File

@ -93,12 +93,12 @@ public abstract class AbsSender {
return (Message) sendApiMethod(forwardMessage);
}
public File sendLocation(SendLocation sendLocation) throws TelegramApiException {
public Message sendLocation(SendLocation sendLocation) throws TelegramApiException {
if (sendLocation == null) {
throw new TelegramApiException("Parameter sendLocation can not be null");
}
return (File) sendApiMethod(sendLocation);
return (Message) sendApiMethod(sendLocation);
}
public UserProfilePhotos getUserProfilePhotos(GetUserProfilePhotos getUserProfilePhotos) throws TelegramApiException {