2020-05-11 20:18:25 +02:00
|
|
|
#ifndef _PURPLE_UTILS_H
|
|
|
|
#define _PURPLE_UTILS_H
|
|
|
|
|
|
|
|
#include "account-data.h"
|
|
|
|
#include <purple.h>
|
|
|
|
|
|
|
|
std::string messageTypeToString(const td::td_api::MessageContent &content);
|
|
|
|
const char *getPurpleStatusId(const td::td_api::UserStatus &tdStatus);
|
2020-05-13 11:21:19 +02:00
|
|
|
std::string getPurpleUserName(const td::td_api::user &user);
|
2020-05-11 20:18:25 +02:00
|
|
|
PurpleConversation *getImConversation(PurpleAccount *account, const char *username);
|
|
|
|
PurpleConvChat *getChatConversation(PurpleAccount *account, const td::td_api::chat &chat,
|
|
|
|
int chatPurpleId, TdAccountData &accountData);
|
2020-05-12 09:35:40 +02:00
|
|
|
std::string getSenderPurpleName(const td::td_api::chat &chat, const td::td_api::message &message,
|
|
|
|
TdAccountData &accountData);
|
2020-05-12 19:37:59 +02:00
|
|
|
std::vector<PurpleChat *> findChatsByInviteLink(const std::string &inviteLink);
|
2020-05-12 09:35:40 +02:00
|
|
|
|
|
|
|
void showMessageText(PurpleAccount *account, const td::td_api::chat &chat, const std::string &sender,
|
|
|
|
const char *text, const char *notification, time_t timestamp, bool outgoing,
|
2020-05-13 14:54:25 +02:00
|
|
|
TdAccountData &accountData, uint32_t extraFlags = 0);
|
2020-05-11 20:18:25 +02:00
|
|
|
void setChatMembers(PurpleConvChat *purpleChat, const td::td_api::basicGroupFullInfo &groupInfo,
|
|
|
|
const TdAccountData &accountData);
|
|
|
|
|
|
|
|
#endif
|