summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Giove <andreagiove@outlook.com>2016-04-17 22:39:38 +0200
committerAndrea Giove <andreagiove@outlook.com>2016-04-17 22:39:38 +0200
commit4bb860175371969088fcb13f2c7bdb18e3cfdfce (patch)
treeb81d618f740d40d9f3bb9c72ef4a9b32f24cd467
parent9ba69d7e87c9b8ff9997294b68550852ef0274b8 (diff)
Fixed compilation errors
-rw-r--r--include/tgbot/types/MessageEntity.h2
-rw-r--r--include/tgbot/types/Voice.h2
-rw-r--r--src/Api.cpp2
-rw-r--r--src/TgTypeParser.cpp8
4 files changed, 7 insertions, 7 deletions
diff --git a/include/tgbot/types/MessageEntity.h b/include/tgbot/types/MessageEntity.h
index befcb3e..37301e6 100644
--- a/include/tgbot/types/MessageEntity.h
+++ b/include/tgbot/types/MessageEntity.h
@@ -16,7 +16,7 @@ namespace TgBot {
*/
class MessageEntity {
public:
- std::shared_ptr<MessageEntity> Ptr;
+ typedef std::shared_ptr<MessageEntity> Ptr;
/**
* Type of the entity. One of mention (@username), hashtag, bot_command, url, email, bold (bold text), italic (italic text), code (monowidth string), pre (monowidth block), text_link (for clickable text URLs).
diff --git a/include/tgbot/types/Voice.h b/include/tgbot/types/Voice.h
index 385257d..b148a50 100644
--- a/include/tgbot/types/Voice.h
+++ b/include/tgbot/types/Voice.h
@@ -16,7 +16,7 @@ namespace TgBot {
*/
class Voice {
public:
- std::shared_ptr<Voice> Ptr;
+ typedef std::shared_ptr<Voice> Ptr;
/**
* Unique identifier for this file.
diff --git a/src/Api.cpp b/src/Api.cpp
index 55c0320..8fcef97 100644
--- a/src/Api.cpp
+++ b/src/Api.cpp
@@ -307,7 +307,7 @@ Message::Ptr Api::sendLocation(int64_t chatId, float latitude, float longitude,
return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendLocation", args));
}
-Message::Ptr Api::sendVenue(int64_t chatId, float latitude, float longitude, std::string title, std::string address, std::string foursquareId, bool disableNotification, int32_t replyToMessageId = 0, const GenericReply::Ptr& replyMarkup) const {
+Message::Ptr Api::sendVenue(int64_t chatId, float latitude, float longitude, std::string title, std::string address, std::string foursquareId, bool disableNotification, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup) const {
vector<HttpReqArg> args;
args.push_back(HttpReqArg("chat_id", chatId));
args.push_back(HttpReqArg("latitude", latitude));
diff --git a/src/TgTypeParser.cpp b/src/TgTypeParser.cpp
index f58bca5..05a287d 100644
--- a/src/TgTypeParser.cpp
+++ b/src/TgTypeParser.cpp
@@ -119,8 +119,8 @@ Message::Ptr TgTypeParser::parseJsonAndGetMessage(const ptree& data) const {
result->video = tryParseJson<Video>(&TgTypeParser::parseJsonAndGetVideo, data, "video");
result->contact = tryParseJson<Contact>(&TgTypeParser::parseJsonAndGetContact, data, "contact");
result->location = tryParseJson<Location>(&TgTypeParser::parseJsonAndGetLocation, data, "location");
- result->newChatParticipant = tryParseJson<User>(&TgTypeParser::parseJsonAndGetUser, data, "new_chat_participant");
- result->leftChatParticipant = tryParseJson<User>(&TgTypeParser::parseJsonAndGetUser, data, "left_chat_participant");
+ result->newChatMember = tryParseJson<User>(&TgTypeParser::parseJsonAndGetUser, data, "new_chat_participant");
+ result->leftChatMember = tryParseJson<User>(&TgTypeParser::parseJsonAndGetUser, data, "left_chat_participant");
result->newChatTitle = data.get("new_chat_title", "");
result->newChatPhoto = parseJsonAndGetArray<PhotoSize>(&TgTypeParser::parseJsonAndGetPhotoSize, data, "new_chat_photo");
result->deleteChatPhoto = data.get("delete_chat_photo", false);
@@ -154,8 +154,8 @@ string TgTypeParser::parseMessage(const Message::Ptr& object) const {
appendToJson(result, "video", parseVideo(object->video));
appendToJson(result, "contact", parseContact(object->contact));
appendToJson(result, "location", parseLocation(object->location));
- appendToJson(result, "new_chat_participant", parseUser(object->newChatParticipant));
- appendToJson(result, "left_chat_participant", parseUser(object->leftChatParticipant));
+ appendToJson(result, "new_chat_member", parseUser(object->newChatMember));
+ appendToJson(result, "left_chat_member", parseUser(object->leftChatMember));
appendToJson(result, "new_chat_title", object->newChatTitle);
appendToJson(result, "new_chat_photo", parseArray(&TgTypeParser::parsePhotoSize, object->newChatPhoto));
appendToJson(result, "delete_chat_photo", object->deleteChatPhoto);