From bdb69445d46ba3f4a8232ab7422836a60471e373 Mon Sep 17 00:00:00 2001 From: morozov Date: Thu, 7 Apr 2016 15:36:13 +0300 Subject: [PATCH] fix Class cast exception --- src/main/java/org/telegram/telegrambots/bots/AbsSender.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/telegram/telegrambots/bots/AbsSender.java b/src/main/java/org/telegram/telegrambots/bots/AbsSender.java index 49a8b337..5e81b4f6 100644 --- a/src/main/java/org/telegram/telegrambots/bots/AbsSender.java +++ b/src/main/java/org/telegram/telegrambots/bots/AbsSender.java @@ -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 {