|
Stream Chat Unreal SDK
|
Represents a Stream Chat message. More...
#include <Message.h>
Public Member Functions | |
| FMessage () | |
| Default construct an invalid message. | |
| FMessage (const FMessageDto &, UUserManager *) | |
| Create a message from a DTO from the API. | |
| FMessage (const FSearchResultDto &, UUserManager *) | |
| FMessage (const FString &Text) | |
| Create a new message from a message string. | |
| FMessageRequestDto | ToRequestDto (const FString &ChannelCid) const |
| bool | IsThreadReply () const |
| Is this message a reply in another message's thread? | |
| bool | IsThreadStart () const |
| Does this message have a thread of replies hanging off it? | |
| bool | IsBounced () const |
| Did moderation bounce this message back to be rephrased? | |
| bool | IsRemovedByModeration () const |
| Did moderation block this message and take it out of the channel? | |
| bool | IsModerationError () const |
| Is this the current user's own message, sitting in the list because moderation bounced it? | |
| bool | IsQuoting () const |
| Is this message quoting another one? Look the quoted message up by QuotedMessageId. | |
| const FString & | GetTranslation (const FString &Language) const |
| The message text in the given language, falling back to Text when it wasn't translated. | |
Public Attributes | |
| FString | Id |
| The message ID. This is either created by the Stream API or set client side when the message is created. | |
| FString | Cid |
| FString | Text |
| The text of this message. | |
| EMessageSendState | State = EMessageSendState::None |
| Sending state of the message. | |
| FUserRef | User |
| User who sent the message. | |
| EMessageType | Type = EMessageType::Regular |
| The message type. | |
| TArray< FUserRef > | MentionedUsers |
| The list of user mentioned in the message. | |
| FDateTime | CreatedAt = FDateTime{0} |
| Date of first message creation. | |
| FDateTime | UpdatedAt = FDateTime{0} |
| Reserved field indicating when the message was updated last time. | |
| TOptional< FDateTime > | DeletedAt |
| Reserved field indicating when the message was deleted. | |
| FReactions | Reactions |
| All reactions of this message, grouped by their type. | |
| FString | ParentId |
| bool | bShowInChannel = false |
| int32 | ReplyCount = 0 |
| How many replies this message's thread has. Zero unless this message started a thread. | |
| TArray< FUserRef > | ThreadParticipants |
| The users who have replied in this message's thread. Empty unless this message started a thread. | |
| bool | bIsSilent = false |
| bool | bIsShadowed = false |
| Whether the message was shadowed or not. | |
| FMessageModeration | Moderation |
| What moderation decided about this message. Unset on all but a handful of messages. | |
| FString | Html |
| Contains HTML markup of the message. | |
| TArray< FAttachment > | Attachments |
| Files, images and link previews attached to this message. | |
| FString | Command |
| bool | bPinned = false |
| Whether this message is pinned in the channel. Set this before sending to pin it. | |
| FDateTime | PinnedAt = FDateTime{0} |
| When the message was pinned. Zero unless it is pinned. Stamped by the API. | |
| FUserRef | PinnedBy |
| Who pinned the message. Invalid unless it is pinned. Set by the API. | |
| FDateTime | PinExpires = FDateTime{0} |
| FString | QuotedMessageId |
| TMap< FString, FString > | Translations |
| FString | OriginalLanguage |
| The language Text was written in, as detected by auto-translation. Empty without it. | |
| FAdditionalFields | ExtraData |
Represents a Stream Chat message.
| const FString & FMessage::GetTranslation | ( | const FString & | Language | ) | const |
The message text in the given language, falling back to Text when it wasn't translated.
| Language | A language code as the API names it, e.g. "fr". Matches OriginalLanguage and the keys of Translations. |
| bool FMessage::IsBounced | ( | ) | const |
Did moderation bounce this message back to be rephrased?
A bounced message was never published and is not stored server side, so it exists only in this client's message list. Offer the author the chance to edit and send it again, or to discard it.
| bool FMessage::IsModerationError | ( | ) | const |
Is this the current user's own message, sitting in the list because moderation bounced it?
The API reports a bounce as an error-type message, which is how it is told apart from a message that failed to send for some other reason.
| FMessageRequestDto FMessage::ToRequestDto | ( | const FString & | ChannelCid | ) | const |
Convert a message into a create/update request for sending to the API. Takes the channel's CID rather than reading this message's, which is empty until it is sent.
| bool FMessage::bShowInChannel = false |
Whether this thread reply should also appear in the main channel message list. Only meaningful together with ParentId.
| FString FMessage::Cid |
CID (<type>:<id>) of the channel the message belongs to. Empty on a message which hasn't been sent yet.
| FString FMessage::Command |
The slash command which produced this message, without the slash, e.g. "giphy". Empty for an ordinary message.
| FString FMessage::ParentId |
The message this one is a reply to. Empty if this message is not a reply in a thread. Set this before sending to start or continue a thread.
| FDateTime FMessage::PinExpires = FDateTime{0} |
When the pin lapses. Zero for a pin which doesn't expire. Set this before sending to pin the message for a limited time.
| FString FMessage::QuotedMessageId |
The ID of the message this one quotes. Empty if it quotes nothing. Set this before sending to quote a message.
| TMap<FString, FString> FMessage::Translations |
Automatic translations of Text, keyed by language code, e.g. "fr". Only filled in by an app which has auto-translation switched on.