2020-05-22 14:48:17 +02:00
|
|
|
#ifndef _CHAT_INFO_H
|
|
|
|
#define _CHAT_INFO_H
|
|
|
|
|
2020-05-09 14:07:21 +02:00
|
|
|
#include <purple.h>
|
|
|
|
#include <td/telegram/td_api.h>
|
|
|
|
|
2020-05-22 14:48:17 +02:00
|
|
|
static constexpr int
|
|
|
|
GROUP_TYPE_BASIC = 1,
|
|
|
|
GROUP_TYPE_SUPER = 2,
|
|
|
|
GROUP_TYPE_CHANNEL = 3;
|
|
|
|
|
2020-05-09 14:07:21 +02:00
|
|
|
GList *getChatJoinInfo();
|
|
|
|
std::string getChatName(const td::td_api::chat &chat);
|
|
|
|
GHashTable *getChatComponents(const td::td_api::chat &chat);
|
2020-05-22 14:48:17 +02:00
|
|
|
|
2020-05-10 12:05:55 +02:00
|
|
|
const char *getChatName(GHashTable *components);
|
2020-05-12 19:37:59 +02:00
|
|
|
const char *getChatInviteLink(GHashTable *components);
|
2020-05-22 14:48:17 +02:00
|
|
|
const char *getChatGroupName(GHashTable *components);
|
|
|
|
int getChatGroupType(GHashTable *components);
|
|
|
|
|
2020-05-10 12:05:55 +02:00
|
|
|
int64_t getTdlibChatId(const char *chatName);
|
2020-05-22 14:48:17 +02:00
|
|
|
|
|
|
|
#endif
|