blob: 349590be811608a6a20e151b179df18fb3f2a8a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#ifndef TGBOT_BUSINESSCONNECTION_H
#define TGBOT_BUSINESSCONNECTION_H
#include "tgbot/types/User.h"
#include <cstdint>
#include <memory>
#include <string>
namespace TgBot {
/**
* @brief Describes the connection of the bot with a business account.
*
* @ingroup types
*/
class BusinessConnection {
public:
typedef std::shared_ptr<BusinessConnection> Ptr;
/**
* @brief Unique identifier of the business connection
*/
std::string id;
/**
* @brief Business account user that created the business connection
*/
User::Ptr user;
/**
* @brief Identifier of a private chat with the user who created the business connection.
*
* This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it.
* But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.
*/
std::int64_t userChatId;
/**
* @brief Date the connection was established in Unix time
*/
std::uint32_t date;
/**
* @brief True, if the bot can act on behalf of the business account in chats that were active in the last 24 hours
*/
bool canReply;
/**
* @brief True, if the connection is active
*/
bool isEnabled;
};
}
#endif //TGBOT_BUSINESSCONNECTION_H
|