26 lines
863 B
C++
26 lines
863 B
C++
#pragma once
|
|
|
|
#include <td/telegram/td_api.h>
|
|
|
|
#include "chat.h"
|
|
#include "message.h"
|
|
#include "user.h"
|
|
|
|
namespace td_api = td::td_api;
|
|
using Object = td_api::object_ptr<td_api::Object>;
|
|
|
|
//converts between tdlib types and own types
|
|
|
|
ChatType convertChatType(const td_api::ChatType& in);
|
|
|
|
void convertUser(const td_api::user& in, User& out);
|
|
UserType convertUserType(const td_api::UserType& in);
|
|
|
|
void convertMessage(const td_api::message& in, Message& out);
|
|
MessageType convertMessageTypeandText(const td_api::MessageContent& cont, std::string& textout);
|
|
|
|
ReplyMarkup* convertReplyMarkup(const td_api::ReplyMarkup* in);
|
|
InlineButton* convertInlineButton(const td_api::inlineKeyboardButton* in);
|
|
|
|
const std::string& getMessageText(const td_api::object_ptr<td_api::message>& msg);
|
|
td_api::formattedText* getMessageFormattedText(td_api::message& msg, bool& isText); |