Stream Chat Unreal SDK
Loading...
Searching...
No Matches
FChatApi Class Reference

All Stream Chat REST API requests can be made via this object. More...

#include <ChatApi.h>

Public Member Functions

Moderation
void BanUser (const FString &TargetUserId, const FString &Type={}, const FString &Id={}, const TOptional< FTimespan > &Timeout={}, const TOptional< FString > &Reason={}, bool bShadow=false, bool bIpBan=false, TCallback< FResponseDto > Callback={}) const
 Users can be banned from an app entirely or from a channel. When a user is banned, they will not be allowed to post messages until the ban is removed or expired but will be able to connect to Chat and to channels as before.
 
void UnbanUser (const FString &TargetUserId, const FString &Type={}, const FString &Id={}, TCallback< FResponseDto > Callback={}) const
 Removes previously applied ban.
 
void QueryBannedUsers (const TSharedRef< FJsonObject > &Filter, const TArray< FSortParamRequestDto > &SortOptions={}, const TOptional< FDateTime > CreatedAtAfterOrEqual={}, const TOptional< FDateTime > CreatedAtAfter={}, const TOptional< FDateTime > CreatedAtBeforeOrEqual={}, const TOptional< FDateTime > CreatedAtBefore={}, TOptional< uint32 > Limit={}, TOptional< uint32 > Offset={}, TCallback< FQueryBannedUsersResponseDto > Callback={}) const
 Find and filter channel scoped or global user bans.
 
void Flag (const FString &TargetMessageId={}, const FString &TargetUserId={}, TCallback< FFlagResponseDto > Callback={}) const
 Flag a user or message.
 
void MuteUsers (const TArray< FString > &TargetUserIds, TOptional< FTimespan > Timeout={}, TCallback< FMuteUserResponseDto > Callback={}) const
 Mute a user.
 
void UnmuteUsers (const TArray< FString > &TargetUserIds, TCallback< FResponseDto > Callback={}) const
 Unmute a previously muted user.
 
void MuteChannels (const TArray< FString > &TargetCids, TOptional< FTimespan > Timeout={}, TCallback< FMuteChannelResponseDto > Callback={}) const
 Mutes channel for user.
 
void UnmuteChannels (const TArray< FString > &TargetCids, TCallback< FResponseDto > Callback={}) const
 Unmutes channel for user.
 
void BlockUser (const FString &TargetUserId, TCallback< FBlockUserResponseDto > Callback={}) const
 Block a user.
 
void UnblockUser (const FString &TargetUserId, TCallback< FResponseDto > Callback={}) const
 Unblock a previously blocked user.
 
void GetBlockedUsers (TCallback< FGetBlockedUsersResponseDto > Callback={}) const
 Get the users blocked by the current user.
 
Channels
void QueryChannel (const FString &ChannelType, const FString &ConnectionId, EChannelFlags Flags=EChannelFlags::State, const FChannelRequestDto &Data={}, const TOptional< FString > &ChannelId={}, const TOptional< FMessagePaginationParamsRequestDto > MessagePagination={}, const TOptional< FPaginationParamsRequestDto > MemberPagination={}, const TOptional< FPaginationParamsRequestDto > WatcherPagination={}, TCallback< FChannelStateResponseDto > Callback={}) const
 Get messages, members or other channel fields. Creates the channel if not yet created.
 
void DeleteChannel (const FString &ChannelType, const FString &ChannelId, TCallback< FDeleteChannelResponseDto > Callback={}) const
 Delete a channel. Messages are soft deleted.
 
void PartialUpdateChannel (const FString &ChannelType, const FString &ChannelId, const TSharedRef< FJsonObject > &Set, const TArray< FString > &Unset, TCallback< FUpdateChannelPartialResponseDto > Callback={}) const
 Updates certain fields of the channel.
 
void UpdateChannel (const FString &ChannelType, const FString &ChannelId, const FUpdateChannelRequestDto &Data, TCallback< FUpdateChannelResponseDto > Callback={}) const
 Change channel data. Any data that is present on the channel and not included in a full update will be deleted.
 
void HideChannel (const FString &ChannelType, const FString &ChannelId, bool bClearHistory=false, TCallback< FResponseDto > Callback={}) const
 Hiding a channel will remove it from query channel requests for that user until a new message is added. Hiding a channel is only available to members of that channel.
 
void ShowChannel (const FString &ChannelType, const FString &ChannelId, TCallback< FResponseDto > Callback={}) const
 Un-hide a channel, so it will again appear in query channel requests.
 
void QueryChannels (const FString &ConnectionId, EChannelFlags Flags=EChannelFlags::State|EChannelFlags::Watch, const TOptional< TSharedRef< FJsonObject > > &Filter={}, const TArray< FSortParamRequestDto > &SortOptions={}, TOptional< uint32 > MemberLimit={}, TOptional< uint32 > MessageLimit={}, TOptional< uint32 > Limit={}, TOptional< uint32 > Offset={}, TCallback< FChannelsResponseDto > Callback={}) const
 Query channels with filter query.
 
void StopWatchingChannel (const FString &ChannelType, const FString &ChannelId, const FString &ConnectionId, TCallback< FResponseDto > Callback={}) const
 Stop receiving channel events.
 
void SearchMessages (const TSharedRef< FJsonObject > &ChannelFilter, const TOptional< FString > &Query={}, const TOptional< TSharedRef< FJsonObject > > &MessageFilter={}, const TArray< FSortParamRequestDto > &Sort={}, TOptional< uint32 > MessageLimit={}, TOptional< uint32 > Offset={}, TOptional< FString > Next={}, TCallback< FSearchResponseDto > Callback={}) const
 Search all messages.
 
void MarkChannelsRead (TCallback< FMarkReadResponseDto > Callback={}) const
 Mark all messages of all channels as read.
 
void MarkChannelRead (const FString &ChannelType, const FString &ChannelId, const TOptional< FString > &MessageId={}, TCallback< FMarkReadResponseDto > Callback={}) const
 Mark messages of a channel as read.
 
void QueryMembers (const FString &ChannelType, const TOptional< TSharedRef< FJsonObject > > &Filter={}, const TOptional< FString > &ChannelId={}, const TOptional< TArray< FString > > &Members={}, const TArray< FSortParamRequestDto > &SortOptions={}, const FMessagePaginationParamsRequestDto &Pagination={}, TCallback< FMembersResponseDto > Callback={}) const
 Find and filter channel members.
 
void TruncateChannel (const FString &ChannelType, const FString &ChannelId, bool bHardDelete=false, const TOptional< FDateTime > &TruncatedAt={}, const TOptional< FMessageRequestDto > &Message={}, bool bSkipPush=false, TCallback< FTruncateChannelResponseDto > Callback={}) const
 Delete all messages of a channel.
 
Messages
void GetMessage (const FString &MessageId, TCallback< FMessageResponseDto > Callback={}) const
 Get a message by its message ID.
 
void SendNewMessage (const FString &ChannelType, const FString &ChannelId, const FMessageRequestDto &MessageRequest, bool bSkipPush=false, TCallback< FMessageResponseDto > Callback={}) const
 Send a message to the given.
 
void UpdateMessage (const FMessageRequestDto &MessageRequest, TCallback< FMessageResponseDto > Callback={}) const
 Update the given message.
 
void DeleteMessage (const FString &Id, bool bHard=false, TCallback< FMessageResponseDto > Callback={}) const
 Delete the message with the given ID.
 
void SendReaction (const FString &MessageId, const FName &Type, bool bEnforceUnique=true, TOptional< uint32 > Score={}, bool bSkipPush=false, TCallback< FReactionResponseDto > Callback={}) const
 Send a reaction for the given MessageId.
 
void DeleteReaction (const FString &MessageId, const FName &Type, TCallback< FReactionResponseDto > Callback={}) const
 Delete a reaction with the given Type from the message with the given MessageId.
 
void GetReactions (const FString &MessageId, TOptional< uint32 > Limit, TOptional< uint32 > Offset, TCallback< FGetReactionsResponseDto > Callback={}) const
 Fetch reactions for the given message, optionally paginating.
 
Events
template<class TEvent >
void SendChannelEvent (const FString &ChannelType, const FString &ChannelId, const TEvent &, TCallback< FEventResponseDto > Callback={})
 Send a custom or built-in event on this channel.
 
Users
void QueryUsers (const FString &ConnectionId, bool bPresence=true, const TOptional< TSharedRef< FJsonObject > > &Filter={}, const TArray< FSortParamRequestDto > &SortOptions={}, TOptional< uint32 > Limit={}, TOptional< uint32 > Offset={}, TCallback< FUsersResponseDto > Callback={}) const
 Search for users and see if they are online/offline.
 
void CreateGuest (const FUserObjectRequestDto &User, TCallback< FGuestResponseDto > Callback={}) const
 
void PartialUpdateUsers (const TArray< FPartialUpdateUser > &Users, TCallback< FUpdateUsersResponseDto > Callback={}) const
 Updates certain fields of a user.
 
void UpsertUsers (const TMap< FString, FUserObjectRequestDto > &Users, TCallback< FUpdateUsersResponseDto > Callback={}) const
 Update or create users in bulk.
 
Devices
void AddDevice (const FString &DeviceId, EPushProvider PushProvider, TCallback< FResponseDto > Callback={}) const
 Registering a device associates it with a user and tells the push provider to send new message notifications to the device.
 
void RemoveDevice (const FString &DeviceId, TCallback< FResponseDto > Callback={}) const
 Unregistering a device removes the device from the user and stops further new message notifications.
 
void ListDevices (TCallback< FListDevicesResponseDto > Callback={}) const
 Returns a list of all available devices.
 

Static Public Member Functions

static TSharedRef< FChatApiCreate (const FString &InApiKey, const FString &InHost, const TSharedPtr< FTokenManager > &)
 

Detailed Description

All Stream Chat REST API requests can be made via this object.

See also
https://getstream.io/chat/docs/rest/

Member Function Documentation

◆ AddDevice()

void FChatApi::AddDevice ( const FString & DeviceId,
EPushProvider PushProvider,
TCallback< FResponseDto > Callback = {} ) const

Registering a device associates it with a user and tells the push provider to send new message notifications to the device.

Parameters
DeviceIdDevice-specific identifier
PushProviderWhich provider to use for push notifications
CallbackCalled when response is received

◆ BanUser()

void FChatApi::BanUser ( const FString & TargetUserId,
const FString & Type = {},
const FString & Id = {},
const TOptional< FTimespan > & Timeout = {},
const TOptional< FString > & Reason = {},
bool bShadow = false,
bool bIpBan = false,
TCallback< FResponseDto > Callback = {} ) const

Users can be banned from an app entirely or from a channel. When a user is banned, they will not be allowed to post messages until the ban is removed or expired but will be able to connect to Chat and to channels as before.

Parameters
TargetUserIdID of user to ban
TypeChannel type to ban user in (optional, ban is app-wide otherwise)
IdChannel ID to ban user in (optional, ban is app-wide otherwise)
TimeoutTimeout of ban in minutes. User will be unbanned after this period of time (optional)
ReasonBan reason (optional)
bShadowWhether to perform shadow ban or not
bIpBanWhether to perform IP ban or not
CallbackCalled when response is received.

◆ BlockUser()

void FChatApi::BlockUser ( const FString & TargetUserId,
TCallback< FBlockUserResponseDto > Callback = {} ) const

Block a user.

Blocking hides all 1-on-1 channels shared with that user, and stops their events and push notifications reaching the blocking user. Group channels are unaffected.

Parameters
TargetUserIdId of the user to block
CallbackCalled when response is received.

◆ DeleteChannel()

void FChatApi::DeleteChannel ( const FString & ChannelType,
const FString & ChannelId,
TCallback< FDeleteChannelResponseDto > Callback = {} ) const

Delete a channel. Messages are soft deleted.

Parameters
ChannelTypeName of built-in or custom channel type (e.g. messaging, team, livestream)
ChannelIdA unique identifier for the channel
CallbackCalled when response is received.

◆ DeleteMessage()

void FChatApi::DeleteMessage ( const FString & Id,
bool bHard = false,
TCallback< FMessageResponseDto > Callback = {} ) const

Delete the message with the given ID.

Parameters
IdID of the message to be deleted
bHardMessage is removed from the channel, all replies and all reactions are recursively deleted
CallbackCalled when response is received

◆ DeleteReaction()

void FChatApi::DeleteReaction ( const FString & MessageId,
const FName & Type,
TCallback< FReactionResponseDto > Callback = {} ) const

Delete a reaction with the given Type from the message with the given MessageId.

Parameters
MessageIdID of the message which has been reacted to
TypeType of reaction to remove
CallbackCalled when response is received

◆ Flag()

void FChatApi::Flag ( const FString & TargetMessageId = {},
const FString & TargetUserId = {},
TCallback< FFlagResponseDto > Callback = {} ) const

Flag a user or message.

Parameters
TargetMessageIdID of message to flag (optional)
TargetUserIdID of user to flag (optional)
CallbackCalled when response is received.

◆ GetBlockedUsers()

void FChatApi::GetBlockedUsers ( TCallback< FGetBlockedUsersResponseDto > Callback = {}) const

Get the users blocked by the current user.

Parameters
CallbackCalled when response is received.

◆ GetMessage()

void FChatApi::GetMessage ( const FString & MessageId,
TCallback< FMessageResponseDto > Callback = {} ) const

Get a message by its message ID.

Parameters
MessageIdThe message ID of an existing message
CallbackCalled when response is received

◆ GetReactions()

void FChatApi::GetReactions ( const FString & MessageId,
TOptional< uint32 > Limit,
TOptional< uint32 > Offset,
TCallback< FGetReactionsResponseDto > Callback = {} ) const

Fetch reactions for the given message, optionally paginating.

Parameters
MessageIdID of the message to fetch reactions for
LimitThe number of reactions to return
OffsetThe pagination offset
CallbackCalled when response is received

◆ HideChannel()

void FChatApi::HideChannel ( const FString & ChannelType,
const FString & ChannelId,
bool bClearHistory = false,
TCallback< FResponseDto > Callback = {} ) const

Hiding a channel will remove it from query channel requests for that user until a new message is added. Hiding a channel is only available to members of that channel.

Parameters
ChannelTypeName of built-in or custom channel type (e.g. messaging, team, livestream)
ChannelIdA unique identifier for the channel
bClearHistoryClear the entire message history of that channel for the user
CallbackCalled when response is received.

◆ ListDevices()

void FChatApi::ListDevices ( TCallback< FListDevicesResponseDto > Callback = {}) const

Returns a list of all available devices.

Parameters
CallbackCalled when response is received

◆ MarkChannelRead()

void FChatApi::MarkChannelRead ( const FString & ChannelType,
const FString & ChannelId,
const TOptional< FString > & MessageId = {},
TCallback< FMarkReadResponseDto > Callback = {} ) const

Mark messages of a channel as read.

Parameters
ChannelTypeName of built-in or custom channel type (e.g. messaging, team, livestream)
ChannelIdA unique identifier for the channel
MessageId(optional) ID of the message that is considered last read by client
CallbackCalled when response is received

◆ MarkChannelsRead()

void FChatApi::MarkChannelsRead ( TCallback< FMarkReadResponseDto > Callback = {}) const

Mark all messages of all channels as read.

Parameters
CallbackCalled when response is received

◆ MuteChannels()

void FChatApi::MuteChannels ( const TArray< FString > & TargetCids,
TOptional< FTimespan > Timeout = {},
TCallback< FMuteChannelResponseDto > Callback = {} ) const

Mutes channel for user.

Parameters
TargetCidsCIDs of channels to mute
TimeoutDuration of mute (optional)
CallbackCalled when response is received.

◆ MuteUsers()

void FChatApi::MuteUsers ( const TArray< FString > & TargetUserIds,
TOptional< FTimespan > Timeout = {},
TCallback< FMuteUserResponseDto > Callback = {} ) const

Mute a user.

Parameters
TargetUserIdsUser IDs to mute
TimeoutDuration of mute (optional)
CallbackCalled when response is received.

◆ PartialUpdateChannel()

void FChatApi::PartialUpdateChannel ( const FString & ChannelType,
const FString & ChannelId,
const TSharedRef< FJsonObject > & Set,
const TArray< FString > & Unset,
TCallback< FUpdateChannelPartialResponseDto > Callback = {} ) const

Updates certain fields of the channel.

Parameters
ChannelTypeName of built-in or custom channel type (e.g. messaging, team, livestream)
ChannelIdA unique identifier for the channel
SetSets new field values
UnsetArray of field names to unset
CallbackCalled when response is received.

◆ PartialUpdateUsers()

void FChatApi::PartialUpdateUsers ( const TArray< FPartialUpdateUser > & Users,
TCallback< FUpdateUsersResponseDto > Callback = {} ) const

Updates certain fields of a user.

Parameters
UsersUser IDs and the fields to set and unset for the user
CallbackCalled when response is received.

◆ QueryBannedUsers()

void FChatApi::QueryBannedUsers ( const TSharedRef< FJsonObject > & Filter,
const TArray< FSortParamRequestDto > & SortOptions = {},
const TOptional< FDateTime > CreatedAtAfterOrEqual = {},
const TOptional< FDateTime > CreatedAtAfter = {},
const TOptional< FDateTime > CreatedAtBeforeOrEqual = {},
const TOptional< FDateTime > CreatedAtBefore = {},
TOptional< uint32 > Limit = {},
TOptional< uint32 > Offset = {},
TCallback< FQueryBannedUsersResponseDto > Callback = {} ) const

Find and filter channel scoped or global user bans.

See also
https://getstream.io/chat/docs/unreal/moderation/#query-bans-endpoint
Parameters
FilterConditions to use to filter the banned users
SortOptionsThe sorting used for the banned users matching the filters. Sorting is based on field and direction, multiple sorting options can be provided.
CreatedAtAfterOrEqualPaginate using the created_at field
CreatedAtAfterPaginate using the created_at field
CreatedAtBeforeOrEqualPaginate using the created_at field
CreatedAtBeforePaginate using the created_at field
LimitThe number of banned users to return
OffsetThe pagination offset
CallbackCalled when response is received.

◆ QueryChannel()

void FChatApi::QueryChannel ( const FString & ChannelType,
const FString & ConnectionId,
EChannelFlags Flags = EChannelFlags::State,
const FChannelRequestDto & Data = {},
const TOptional< FString > & ChannelId = {},
const TOptional< FMessagePaginationParamsRequestDto > MessagePagination = {},
const TOptional< FPaginationParamsRequestDto > MemberPagination = {},
const TOptional< FPaginationParamsRequestDto > WatcherPagination = {},
TCallback< FChannelStateResponseDto > Callback = {} ) const

Get messages, members or other channel fields. Creates the channel if not yet created.

Parameters
ChannelTypeName of built-in or custom channel type (e.g. messaging, team, livestream)
ConnectionIdWebsocket connection ID to interact with.
ChannelIdA unique identifier for the channel. (either this or members is required)
FlagsAdditional actions to perform, like watch, or fetch presence.
See also
EChannelFlags
Parameters
DataProperties to set on the channel
MessagePaginationPagination details for returned messages.
See also
https://getstream.io/chat/docs/unreal/channel_pagination/
Parameters
MemberPaginationPagination details for returned members.
WatcherPaginationPagination details for returned watchers/
CallbackCalled when response is received.

◆ QueryChannels()

void FChatApi::QueryChannels ( const FString & ConnectionId,
EChannelFlags Flags = EChannelFlags::State | EChannelFlags::Watch,
const TOptional< TSharedRef< FJsonObject > > & Filter = {},
const TArray< FSortParamRequestDto > & SortOptions = {},
TOptional< uint32 > MemberLimit = {},
TOptional< uint32 > MessageLimit = {},
TOptional< uint32 > Limit = {},
TOptional< uint32 > Offset = {},
TCallback< FChannelsResponseDto > Callback = {} ) const

Query channels with filter query.

Parameters
ConnectionIdWebsocket connection ID to interact with.
FilterThe query filters to use. You can query on any of the custom fields you've defined on the Channel. You can also filter other built-in channel fields,
See also
https://getstream.io/chat/docs/unreal/query_channels/#channel-queryable-built-in-fields
Parameters
SortOptionsThe sorting used for the channels matching the filters. Sorting is based on field and direction, multiple sorting options can be provided.
MemberLimitHow many members should be included for each channel (Max 100)
MessageLimitHow many messages should be included to each channel (Max 300)
LimitThe number of channels to return (max is 30, optional)
OffsetThe pagination offset (max is 1000, optional)
FlagsAdditional actions to perform, like watch, or fetch presence.
See also
EChannelFlags
Parameters
CallbackCalled when response is received

◆ QueryMembers()

void FChatApi::QueryMembers ( const FString & ChannelType,
const TOptional< TSharedRef< FJsonObject > > & Filter = {},
const TOptional< FString > & ChannelId = {},
const TOptional< TArray< FString > > & Members = {},
const TArray< FSortParamRequestDto > & SortOptions = {},
const FMessagePaginationParamsRequestDto & Pagination = {},
TCallback< FMembersResponseDto > Callback = {} ) const

Find and filter channel members.

Parameters
ChannelTypeName of built-in or custom channel type (e.g. messaging, team, livestream)
FilterConditions to use to filter the members
ChannelIdA unique identifier for the channel (either this or
Membersis required)
MembersUse list of creating members to identify channel (either this or
ChannelIdis required)
SortOptionsThe sorting used for the members matching the filters. Sorting is based on field and direction, multiple sorting options can be provided.
PaginationLimit, offset, and member selection by user id GtId, GteId, LtId and LteId fields are for user IDs
CallbackCalled when response is received

◆ QueryUsers()

void FChatApi::QueryUsers ( const FString & ConnectionId,
bool bPresence = true,
const TOptional< TSharedRef< FJsonObject > > & Filter = {},
const TArray< FSortParamRequestDto > & SortOptions = {},
TOptional< uint32 > Limit = {},
TOptional< uint32 > Offset = {},
TCallback< FUsersResponseDto > Callback = {} ) const

Search for users and see if they are online/offline.

Parameters
ConnectionIdWebsocket connection ID to interact with.
bPresenceGet updates when the user goes offline/online
FilterConditions to use to filter the users,
See also
https://getstream.io/chat/docs/unreal/query_users
Parameters
SortOptionsThe sorting used for the users matching the filters. Sorting is based on field and direction, multiple sorting options can be provided.
LimitThe number of users to return
OffsetThe pagination offset
CallbackCalled when response is received

◆ RemoveDevice()

void FChatApi::RemoveDevice ( const FString & DeviceId,
TCallback< FResponseDto > Callback = {} ) const

Unregistering a device removes the device from the user and stops further new message notifications.

Parameters
DeviceIdDevice-specific identifier
CallbackCalled when response is received

◆ SearchMessages()

void FChatApi::SearchMessages ( const TSharedRef< FJsonObject > & ChannelFilter,
const TOptional< FString > & Query = {},
const TOptional< TSharedRef< FJsonObject > > & MessageFilter = {},
const TArray< FSortParamRequestDto > & Sort = {},
TOptional< uint32 > MessageLimit = {},
TOptional< uint32 > Offset = {},
TOptional< FString > Next = {},
TCallback< FSearchResponseDto > Callback = {} ) const

Search all messages.

ChannelFilter is required, and a minimum of either a query or message filter

See also
https://getstream.io/chat/docs/unreal/search/
Parameters
QuerySearch phrase
ChannelFilterChannel filter conditions
MessageFilterMessage filter conditions
SortSort parameters. Cannot be used with non-zero offset.
MessageLimitNumber of messages to return
OffsetPagination offset. Cannot be used with sort or next
NextPagination parameter. Cannot be used with non-zero offset
CallbackCalled when response is received

◆ SendChannelEvent()

template<class TEvent >
void FChatApi::SendChannelEvent ( const FString & ChannelType,
const FString & ChannelId,
const TEvent & Event,
TCallback< FEventResponseDto > Callback = {} )

Send a custom or built-in event on this channel.

Template Parameters
TEventThe event to send
Parameters
ChannelTypeName of built-in or custom channel type (e.g. messaging, team, livestream)
ChannelIdThe unique identifier of the channel
CallbackCalled when response is received

◆ SendNewMessage()

void FChatApi::SendNewMessage ( const FString & ChannelType,
const FString & ChannelId,
const FMessageRequestDto & MessageRequest,
bool bSkipPush = false,
TCallback< FMessageResponseDto > Callback = {} ) const

Send a message to the given.

Parameters
ChannelIdof the given
ChannelType.
ChannelTypeName of built-in or custom channel type (e.g. messaging, team, livestream)
ChannelIdA unique identifier for the channel
MessageRequestDetails of the message to be sent
bSkipPushDo not send a mobile push notification
CallbackCalled when response is received

◆ SendReaction()

void FChatApi::SendReaction ( const FString & MessageId,
const FName & Type,
bool bEnforceUnique = true,
TOptional< uint32 > Score = {},
bool bSkipPush = false,
TCallback< FReactionResponseDto > Callback = {} ) const

Send a reaction for the given MessageId.

Parameters
MessageIdID of the message to react to
TypeThe type of reaction (e.g. 'like', 'laugh', 'wow')
bEnforceUniqueIf true, new reaction will replace all reactions the user has (if any) on this message
bSkipPushDo not send a mobile push notification
ScoreOptionally include a score for the reaction
See also
https://getstream.io/chat/docs/unreal/send_reaction/?language=unreal#cumulative-(clap)-reactions
Parameters
CallbackCalled when response is received

◆ ShowChannel()

void FChatApi::ShowChannel ( const FString & ChannelType,
const FString & ChannelId,
TCallback< FResponseDto > Callback = {} ) const

Un-hide a channel, so it will again appear in query channel requests.

Parameters
ChannelTypeName of built-in or custom channel type (e.g. messaging, team, livestream)
ChannelIdA unique identifier for the channel
CallbackCalled when response is received.

◆ StopWatchingChannel()

void FChatApi::StopWatchingChannel ( const FString & ChannelType,
const FString & ChannelId,
const FString & ConnectionId,
TCallback< FResponseDto > Callback = {} ) const

Stop receiving channel events.

Parameters
ChannelTypeName of built-in or custom channel type (e.g. messaging, team, livestream)
ChannelIdA unique identifier for the channel
ConnectionIdWebsocket connection ID to interact with.
CallbackCalled when response is received.

◆ TruncateChannel()

void FChatApi::TruncateChannel ( const FString & ChannelType,
const FString & ChannelId,
bool bHardDelete = false,
const TOptional< FDateTime > & TruncatedAt = {},
const TOptional< FMessageRequestDto > & Message = {},
bool bSkipPush = false,
TCallback< FTruncateChannelResponseDto > Callback = {} ) const

Delete all messages of a channel.

Parameters
ChannelTypeName of built-in or custom channel type (e.g. messaging, team, livestream)
ChannelIdA unique identifier for the channel
bHardDeleteActually delete messages, instead of soft-deleting (hiding) them
TruncatedAtTruncate this channel only up to given time
MessageA system message to be added after truncation
bSkipPushIf a message is included, don't send the push notification
CallbackCalled when response is received

◆ UnbanUser()

void FChatApi::UnbanUser ( const FString & TargetUserId,
const FString & Type = {},
const FString & Id = {},
TCallback< FResponseDto > Callback = {} ) const

Removes previously applied ban.

Parameters
TargetUserIdID of user to unban
TypeChannel type to unban user in (optional, unban is app-wide otherwise)
IdChannel ID to unban user in (optional, unban is app-wide otherwise)
CallbackCalled when response is received.

◆ UnblockUser()

void FChatApi::UnblockUser ( const FString & TargetUserId,
TCallback< FResponseDto > Callback = {} ) const

Unblock a previously blocked user.

Parameters
TargetUserIdId of the user to unblock
CallbackCalled when response is received.

◆ UnmuteChannels()

void FChatApi::UnmuteChannels ( const TArray< FString > & TargetCids,
TCallback< FResponseDto > Callback = {} ) const

Unmutes channel for user.

Parameters
TargetCidsCIDs of channels to unmute
CallbackCalled when response is received.

◆ UnmuteUsers()

void FChatApi::UnmuteUsers ( const TArray< FString > & TargetUserIds,
TCallback< FResponseDto > Callback = {} ) const

Unmute a previously muted user.

Parameters
TargetUserIdsUser IDs to unmute
CallbackCalled when response is received.

◆ UpdateChannel()

void FChatApi::UpdateChannel ( const FString & ChannelType,
const FString & ChannelId,
const FUpdateChannelRequestDto & Data,
TCallback< FUpdateChannelResponseDto > Callback = {} ) const

Change channel data. Any data that is present on the channel and not included in a full update will be deleted.

Parameters
ChannelTypeName of built-in or custom channel type (e.g. messaging, team, livestream)
ChannelIdA unique identifier for the channel
DataProperties to set on the channel
CallbackCalled when response is received.

◆ UpdateMessage()

void FChatApi::UpdateMessage ( const FMessageRequestDto & MessageRequest,
TCallback< FMessageResponseDto > Callback = {} ) const

Update the given message.

Parameters
MessageRequestDetails of the message to update
CallbackCalled when response is received

◆ UpsertUsers()

void FChatApi::UpsertUsers ( const TMap< FString, FUserObjectRequestDto > & Users,
TCallback< FUpdateUsersResponseDto > Callback = {} ) const

Update or create users in bulk.

Parameters
UsersMap of user IDs to user objects
CallbackCalled when response is received.

The documentation for this class was generated from the following files: