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

#include "User.hpp"
#include "Text.hpp"
#include <string>
#include <vector>

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;
    };
}