Sendbird Chat SDK for Unreal
SBDBaseMessage.h
1// Copyright (c) 2021 Sendbird, Inc. All rights reserved.
2
3#ifndef SENDBIRD_SBDBASEMESSAGE_H_
4#define SENDBIRD_SBDBASEMESSAGE_H_
5
6#include "SBDUser.h"
7#include "SBDTypes.h"
8#include "SBDMessageMetaArray.h"
9
10#include <vector>
11
12class SBDBaseChannel;
13class FSBDBaseMessage;
14
20public:
24 SBDMessageType message_type;
25
29 uint64_t message_id;
30
34 std::wstring channel_url;
35
39 int64_t created_at;
40
44 int64_t updated_at;
45
49 std::wstring channel_type;
50
54 SBDMentionType mention_type;
55
59 std::vector<SBDUser> mentioned_users;
60
64 std::vector<SBDMessageMetaArray> meta_arrays;
65
72
79
85 std::vector<SBDMessageMetaArray> GetMetaArraysWithKeys(const std::vector<std::wstring>& metaarraykeys);
86
87public:
88 virtual ~SBDBaseMessage() {};
89
90protected:
91 SBDBaseMessage(const std::string& dict);
92
93private:
94 static SBDBaseMessage* BuildFromDict(const std::string& dict);
95 static SBDBaseMessage* Build(const std::string& dict, SBDBaseChannel* channel);
96 static SBDBaseMessage* BuildFromData(const std::string& data);
97 SBDMessageMetaArray* GetMetaArrayByKey(std::wstring key);
98
99 friend FSBDBaseMessage;
100};
101
102#endif /* SENDBIRD_SBDBASEMESSAGE_H_ */
Definition: SBDBaseChannel.h:271
Definition: SBDBaseMessage.h:19
bool IsOpenChannel()
std::vector< SBDUser > mentioned_users
Definition: SBDBaseMessage.h:59
std::wstring channel_type
Definition: SBDBaseMessage.h:49
bool IsGroupChannel()
uint64_t message_id
Definition: SBDBaseMessage.h:29
int64_t created_at
Definition: SBDBaseMessage.h:39
std::vector< SBDMessageMetaArray > meta_arrays
Definition: SBDBaseMessage.h:64
SBDMessageType message_type
Definition: SBDBaseMessage.h:24
std::vector< SBDMessageMetaArray > GetMetaArraysWithKeys(const std::vector< std::wstring > &metaarraykeys)
std::wstring channel_url
Definition: SBDBaseMessage.h:34
int64_t updated_at
Definition: SBDBaseMessage.h:44
SBDMentionType mention_type
Definition: SBDBaseMessage.h:54
Definition: SBDMessageMetaArray.h:14