summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJellyBrick <shlee1503@naver.com>2018-05-27 17:30:39 +0900
committerJellyBrick <shlee1503@naver.com>2018-05-27 17:30:39 +0900
commit8206df62f7f9540a2f13ce31c85f8a1f2054bd56 (patch)
treef8fb5ec4990fcb426c21cfb0f038152ff1063184
parenta1e7e4db6da26bb63c3befe818de5ef60fdd049b (diff)
Fix build error (cross-reference)
-rw-r--r--include/tgbot/types/Chat.h2
-rw-r--r--src/Api.cpp2
-rw-r--r--src/TgTypeParser.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/include/tgbot/types/Chat.h b/include/tgbot/types/Chat.h
index d286a63..c5c397f 100644
--- a/include/tgbot/types/Chat.h
+++ b/include/tgbot/types/Chat.h
@@ -27,10 +27,10 @@
#include <memory>
#include "tgbot/types/ChatPhoto.h"
-#include "tgbot/types/Message.h"
namespace TgBot {
+class Message;
/**
* This object represents a Telegram Chat
* @ingroup types
diff --git a/src/Api.cpp b/src/Api.cpp
index 568ca71..5b9c8e8 100644
--- a/src/Api.cpp
+++ b/src/Api.cpp
@@ -792,7 +792,7 @@ bool Api::setChatDescription(int64_t chatId, std::string description) const {
bool Api::pinChatMessage(int64_t chatId, int32_t messageId, bool disableNotification) const {
vector<HttpReqArg> args;
args.push_back(HttpReqArg("chat_id", chatId));
- args.push_back(HttpReqArg("description", description));
+ args.push_back(HttpReqArg("message_id", messageId));
if (disableNotification) {
args.push_back(HttpReqArg("disable_notification", disableNotification));
}
diff --git a/src/TgTypeParser.cpp b/src/TgTypeParser.cpp
index 9a48de5..0facf93 100644
--- a/src/TgTypeParser.cpp
+++ b/src/TgTypeParser.cpp
@@ -53,7 +53,7 @@ Chat::Ptr TgTypeParser::parseJsonAndGetChat(const ptree& data) const {
result->photo = tryParseJson<ChatPhoto>(&TgTypeParser::parseJsonAndGetChatPhoto, data, "photo");
result->description = data.get("description", "");
result->inviteLink = data.get("invite_link", "");
- result->pinnedMessage = tryParseJson<ChatPhoto>(&TgTypeParser::parseJsonAndGetMessage, data, "pinned_message");
+ result->pinnedMessage = tryParseJson<Message>(&TgTypeParser::parseJsonAndGetMessage, data, "pinned_message");
result->stickerSetName = data.get("sticker_set_name", "");
result->canSetStickerSet = data.get<bool>("can_set_sticker_set", false);