Stream Chat Unreal SDK
Loading...
Searching...
No Matches
MessageDto.h
1// Copyright 2026 Stream.IO, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "AdditionalFields.h"
6#include "CoreMinimal.h"
7#include "MessageTypeDto.h"
8#include "Response/Message/AttachmentDto.h"
9#include "Response/Moderation/MessageModerationDto.h"
10#include "Response/Reaction/ReactionDto.h"
11#include "UserObjectDto.h"
12
13#include "MessageDto.generated.h"
14
15class FJsonObject;
16
23USTRUCT()
24struct STREAMCHATDTO_API FMessageDto
25{
26 GENERATED_BODY()
27
28
29 TOptional<FDateTime> GetDeletedAt() const;
30
33 UPROPERTY()
35
37 UPROPERTY()
38 FString Cid;
39
41 UPROPERTY()
42 FString Command;
43
45 UPROPERTY()
46 FDateTime CreatedAt = FDateTime{0};
47
49 UPROPERTY()
50 FString Html;
51
56 UPROPERTY()
57 TMap<FString, FString> I18n;
58
61 UPROPERTY()
62 FString Id;
63
64 // `image_labels` is not read: it is how the older moderation API reported what it saw in an
65 // attached image, and Moderation V2 sends the same thing as image harms, which FMessageModeration
66 // already carries for both versions.
67
69 UPROPERTY()
70 TArray<FReactionDto> LatestReactions;
71
73 UPROPERTY()
74 TArray<FUserObjectDto> MentionedUsers;
75
78 UPROPERTY()
79 FString Mml;
80
82 UPROPERTY()
84
88 UPROPERTY()
89 FMessageModerationDto ModerationDetails;
90
92 UPROPERTY()
93 TArray<FReactionDto> OwnReactions;
94
96 UPROPERTY()
97 FString ParentId;
98
100 UPROPERTY()
101 FDateTime PinExpires = FDateTime{0};
102
104 UPROPERTY()
105 bool bPinned = false;
106
108 UPROPERTY()
109 FDateTime PinnedAt = FDateTime{0};
110
112 UPROPERTY()
114
115 // The quoted message itself is not read: a USTRUCT cannot hold one of its own type, so this DTO
116 // would have to be duplicated to carry it. The ID below is the handle, and the quoted message is
117 // in the channel's message list under it.
118
120 UPROPERTY()
121 FString QuotedMessageId;
122
124 UPROPERTY()
125 TMap<FName, int32> ReactionCounts;
126
128 UPROPERTY()
129 TMap<FName, int32> ReactionScores;
130
132 UPROPERTY()
133 uint32 ReplyCount = 0;
134
136 UPROPERTY()
137 bool bShadowed = false;
138
140 UPROPERTY()
141 bool bShowInChannel = false;
142
144 UPROPERTY()
145 bool bSilent = false;
146
148 UPROPERTY()
149 FString Text;
150
152 UPROPERTY()
153 TArray<FUserObjectDto> ThreadParticipants;
154
156 UPROPERTY()
158
160 UPROPERTY()
161 FDateTime UpdatedAt = FDateTime{0};
162
166 UPROPERTY()
168
169 UPROPERTY()
170 FAdditionalFields AdditionalFields;
171};
EMessageTypeDto
DTO for type of message.
Definition MessageTypeDto.h:16
@ Id
Message ID.
@ Attachments
Whether or not the message contains an attachment.
@ Text
Text of the message.
@ Type
Type of the message.
@ ParentId
The parent message ID (if the message is a reply)
@ ReplyCount
The number of replies the message has.
#/components/schemas/Attachment A file, image or link attached to a message.
Definition AttachmentDto.h:22
#/components/schemas/Message Represents any chat message. Used in responses only
Definition MessageDto.h:25
#/components/schemas/MessageModerationResult The moderation verdict the API reached for a message.
Definition MessageModerationDto.h:21
#/components/schemas/Reaction Represents user reaction to a message
Definition ReactionDto.h:17
#/components/schemas/UserObject Used in both requests and responses
Definition UserObjectDto.h:17