aboutsummaryrefslogtreecommitdiff
path: root/include/Message.hpp
blob: a2d67e8e90437610530bc37ee6fb7523a658fe57 (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
#pragma once

#include "User.hpp"
#include "Text.hpp"
#include <string>
#include <vector>
#include <odhtdb/Hash.hpp>

namespace dchat
{
    class Message
    {
    public:
        enum class Type
        {
            REGULAR,
            EDITED
        };
        
        // If timestamp is 0, then timestamp is not used
        Message(User *user, const std::string &text, u64 timestampSeconds = 0);
        
        const User *user;
        Text text;
        const u64 timestampSeconds;
        Type type;
        odhtdb::Hash id;
    };
}