summaryrefslogtreecommitdiff
path: root/include/tgbot/types/MessageOrigin.h
blob: 3d0b80f5203cf8029220ce37e966dcb8cbe92ab9 (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
#ifndef TGBOT_MESSAGEORIGIN_H
#define TGBOT_MESSAGEORIGIN_H

#include <cstdint>
#include <memory>
#include <string>

namespace TgBot {

/**
 * @brief This object describes the origin of a message.
 *
 * It can be one of
 * - MessageOriginUser
 * - MessageOriginHiddenUser
 * - MessageOriginChat
 * - MessageOriginChannel
 *
 * @ingroup types
 */
class MessageOrigin {

public:
    typedef std::shared_ptr<MessageOrigin> Ptr;

    MessageOrigin() {}

    virtual ~MessageOrigin() {}

    /**
     * @brief Type of the message origin
     */
    std::string type;

    /**
     * @brief Date the message was sent originally in Unix time
     */
    std::uint32_t date;
};
}

#endif //TGBOT_MESSAGEORIGIN_H