Stream Chat Unreal SDK
|
All Stream Chat REST API requests can be made via this object. More...
#include <ChatApi.h>
Inherits TSharedFromThis< FChatApi >.
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. More... | |
void | UnbanUser (const FString &TargetUserId, const FString &Type={}, const FString &Id={}, TCallback< FResponseDto > Callback={}) const |
Removes previously applied ban. More... | |
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. More... | |
void | Flag (const FString &TargetMessageId={}, const FString &TargetUserId={}, TCallback< FFlagResponseDto > Callback={}) const |
Flag a user or message. More... | |
void | MuteUsers (const TArray< FString > &TargetUserIds, TOptional< FTimespan > Timeout={}, TCallback< FMuteUserResponseDto > Callback={}) const |
Mute a user. More... | |
void | UnmuteUsers (const TArray< FString > &TargetUserIds, TCallback< FResponseDto > Callback={}) const |
Unmute a previously muted user. More... | |
void | MuteChannels (const TArray< FString > &TargetCids, TOptional< FTimespan > Timeout={}, TCallback< FMuteChannelResponseDto > Callback={}) const |
Mutes channel for user. More... | |
void | UnmuteChannels (const TArray< FString > &TargetCids, TCallback< FResponseDto > Callback={}) const |
Unmutes channel for user. More... | |
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. More... | |
void | DeleteChannel (const FString &ChannelType, const FString &ChannelId, TCallback< FDeleteChannelResponseDto > Callback={}) const |
Delete a channel. Messages are soft deleted. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | StopWatchingChannel (const FString &ChannelType, const FString &ChannelId, const FString &ConnectionId, TCallback< FResponseDto > Callback={}) const |
Stop receiving channel events. More... | |
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. More... | |
void | MarkChannelsRead (TCallback< FMarkReadResponseDto > Callback={}) const |
Mark all messages of all channels as read. More... | |
void | MarkChannelRead (const FString &ChannelType, const FString &ChannelId, const TOptional< FString > &MessageId={}, TCallback< FMarkReadResponseDto > Callback={}) const |
Mark messages of a channel as read. More... | |
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. More... | |
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. More... | |
Messages | |
void | GetMessage (const FString &MessageId, TCallback< FMessageResponseDto > Callback={}) const |
Get a message by its message ID. More... | |
void | SendNewMessage (const FString &ChannelType, const FString &ChannelId, const FMessageRequestDto &MessageRequest, bool bSkipPush=false, TCallback< FMessageResponseDto > Callback={}) const |
Send a message to the given. More... | |
void | UpdateMessage (const FMessageRequestDto &MessageRequest, TCallback< FMessageResponseDto > Callback={}) const |
Update the given message. More... | |
void | DeleteMessage (const FString &Id, bool bHard=false, TCallback< FMessageResponseDto > Callback={}) const |
Delete the message with the given ID. More... | |
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. More... | |
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. More... | |
void | GetReactions (const FString &MessageId, TOptional< uint32 > Limit, TOptional< uint32 > Offset, TCallback< FGetReactionsResponseDto > Callback={}) const |
Fetch reactions for the given message, optionally paginating. More... | |
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. More... | |
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. More... | |
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. More... | |
void | UpsertUsers (const TMap< FString, FUserObjectRequestDto > &Users, TCallback< FUpdateUsersResponseDto > Callback={}) const |
Update or create users in bulk. More... | |
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. More... | |
void | RemoveDevice (const FString &DeviceId, TCallback< FResponseDto > Callback={}) const |
Unregistering a device removes the device from the user and stops further new message notifications. More... | |
void | ListDevices (TCallback< FListDevicesResponseDto > Callback={}) const |
Returns a list of all available devices. More... | |
Static Public Member Functions | |
static TSharedRef< FChatApi > | Create (const FString &InApiKey, const FString &InHost, const TSharedPtr< FTokenManager > &) |
All Stream Chat REST API requests can be made via this object.
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.
DeviceId | Device-specific identifier |
PushProvider | Which provider to use for push notifications |
Callback | Called when response is received |
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.
TargetUserId | ID of user to ban |
Type | Channel type to ban user in (optional, ban is app-wide otherwise) |
Id | Channel ID to ban user in (optional, ban is app-wide otherwise) |
Timeout | Timeout of ban in minutes. User will be unbanned after this period of time (optional) |
Reason | Ban reason (optional) |
bShadow | Whether to perform shadow ban or not |
bIpBan | Whether to perform IP ban or not |
Callback | Called when response is received. |
void FChatApi::DeleteChannel | ( | const FString & | ChannelType, |
const FString & | ChannelId, | ||
TCallback< FDeleteChannelResponseDto > | Callback = {} |
||
) | const |
Delete a channel. Messages are soft deleted.
ChannelType | Name of built-in or custom channel type (e.g. messaging, team, livestream) |
ChannelId | A unique identifier for the channel |
Callback | Called when response is received. |
void FChatApi::DeleteMessage | ( | const FString & | Id, |
bool | bHard = false , |
||
TCallback< FMessageResponseDto > | Callback = {} |
||
) | const |
Delete the message with the given ID.
Id | ID of the message to be deleted |
bHard | Message is removed from the channel, all replies and all reactions are recursively deleted |
Callback | Called when response is received |
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.
MessageId | ID of the message which has been reacted to |
Type | Type of reaction to remove |
Callback | Called when response is received |
void FChatApi::Flag | ( | const FString & | TargetMessageId = {} , |
const FString & | TargetUserId = {} , |
||
TCallback< FFlagResponseDto > | Callback = {} |
||
) | const |
Flag a user or message.
TargetMessageId | ID of message to flag (optional) |
TargetUserId | ID of user to flag (optional) |
Callback | Called when response is received. |
void FChatApi::GetMessage | ( | const FString & | MessageId, |
TCallback< FMessageResponseDto > | Callback = {} |
||
) | const |
Get a message by its message ID.
MessageId | The message ID of an existing message |
Callback | Called when response is received |
void FChatApi::GetReactions | ( | const FString & | MessageId, |
TOptional< uint32 > | Limit, | ||
TOptional< uint32 > | Offset, | ||
TCallback< FGetReactionsResponseDto > | Callback = {} |
||
) | const |
Fetch reactions for the given message, optionally paginating.
MessageId | ID of the message to fetch reactions for |
Limit | The number of reactions to return |
Offset | The pagination offset |
Callback | Called when response is received |
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.
ChannelType | Name of built-in or custom channel type (e.g. messaging, team, livestream) |
ChannelId | A unique identifier for the channel |
bClearHistory | Clear the entire message history of that channel for the user |
Callback | Called when response is received. |
void FChatApi::ListDevices | ( | TCallback< FListDevicesResponseDto > | Callback = {} | ) | const |
Returns a list of all available devices.
Callback | Called when response is received |
void FChatApi::MarkChannelRead | ( | const FString & | ChannelType, |
const FString & | ChannelId, | ||
const TOptional< FString > & | MessageId = {} , |
||
TCallback< FMarkReadResponseDto > | Callback = {} |
||
) | const |
Mark messages of a channel as read.
ChannelType | Name of built-in or custom channel type (e.g. messaging, team, livestream) |
ChannelId | A unique identifier for the channel |
MessageId | (optional) ID of the message that is considered last read by client |
Callback | Called when response is received |
void FChatApi::MarkChannelsRead | ( | TCallback< FMarkReadResponseDto > | Callback = {} | ) | const |
Mark all messages of all channels as read.
Callback | Called when response is received |
void FChatApi::MuteChannels | ( | const TArray< FString > & | TargetCids, |
TOptional< FTimespan > | Timeout = {} , |
||
TCallback< FMuteChannelResponseDto > | Callback = {} |
||
) | const |
Mutes channel for user.
TargetCids | CIDs of channels to mute |
Timeout | Duration of mute (optional) |
Callback | Called when response is received. |
void FChatApi::MuteUsers | ( | const TArray< FString > & | TargetUserIds, |
TOptional< FTimespan > | Timeout = {} , |
||
TCallback< FMuteUserResponseDto > | Callback = {} |
||
) | const |
Mute a user.
TargetUserIds | User IDs to mute |
Timeout | Duration of mute (optional) |
Callback | Called when response is received. |
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.
ChannelType | Name of built-in or custom channel type (e.g. messaging, team, livestream) |
ChannelId | A unique identifier for the channel |
Set | Sets new field values |
Unset | Array of field names to unset |
Callback | Called when response is received. |
void FChatApi::PartialUpdateUsers | ( | const TArray< FPartialUpdateUser > & | Users, |
TCallback< FUpdateUsersResponseDto > | Callback = {} |
||
) | const |
Updates certain fields of a user.
Users | User IDs and the fields to set and unset for the user |
Callback | Called when response is received. |
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.
Filter | Conditions to use to filter the banned users |
SortOptions | The sorting used for the banned users matching the filters. Sorting is based on field and direction, multiple sorting options can be provided. |
CreatedAtAfterOrEqual | Paginate using the created_at field |
CreatedAtAfter | Paginate using the created_at field |
CreatedAtBeforeOrEqual | Paginate using the created_at field |
CreatedAtBefore | Paginate using the created_at field |
Limit | The number of banned users to return |
Offset | The pagination offset |
Callback | Called when response is received. |
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.
ChannelType | Name of built-in or custom channel type (e.g. messaging, team, livestream) |
ConnectionId | Websocket connection ID to interact with. |
ChannelId | A unique identifier for the channel. (either this or members is required) |
Flags | Additional actions to perform, like watch, or fetch presence. |
Data | Properties to set on the channel |
MessagePagination | Pagination details for returned messages. |
MemberPagination | Pagination details for returned members. |
WatcherPagination | Pagination details for returned watchers/ |
Callback | Called when response is received. |
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.
ConnectionId | Websocket connection ID to interact with. |
Filter | The 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, |
SortOptions | The sorting used for the channels matching the filters. Sorting is based on field and direction, multiple sorting options can be provided. |
MemberLimit | How many members should be included for each channel (Max 100) |
MessageLimit | How many messages should be included to each channel (Max 300) |
Limit | The number of channels to return (max is 30, optional) |
Offset | The pagination offset (max is 1000, optional) |
Flags | Additional actions to perform, like watch, or fetch presence. |
Callback | Called when response is received |
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.
ChannelType | Name of built-in or custom channel type (e.g. messaging, team, livestream) |
Filter | Conditions to use to filter the members |
ChannelId | A unique identifier for the channel (either this or |
Members | is required) |
Members | Use list of creating members to identify channel (either this or |
ChannelId | is required) |
SortOptions | The sorting used for the members matching the filters. Sorting is based on field and direction, multiple sorting options can be provided. |
Pagination | Limit, offset, and member selection by user id GtId, GteId, LtId and LteId fields are for user IDs |
Callback | Called when response is received |
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.
ConnectionId | Websocket connection ID to interact with. |
bPresence | Get updates when the user goes offline/online |
Filter | Conditions to use to filter the users, |
SortOptions | The sorting used for the users matching the filters. Sorting is based on field and direction, multiple sorting options can be provided. |
Limit | The number of users to return |
Offset | The pagination offset |
Callback | Called when response is received |
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.
DeviceId | Device-specific identifier |
Callback | Called when response is received |
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
Query | Search phrase |
ChannelFilter | Channel filter conditions |
MessageFilter | Message filter conditions |
Sort | Sort parameters. Cannot be used with non-zero offset. |
MessageLimit | Number of messages to return |
Offset | Pagination offset. Cannot be used with sort or next |
Next | Pagination parameter. Cannot be used with non-zero offset |
Callback | Called when response is received |
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.
TEvent | The event to send |
ChannelType | Name of built-in or custom channel type (e.g. messaging, team, livestream) |
ChannelId | The unique identifier of the channel |
Callback | Called when response is received |
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.
ChannelId | of the given |
ChannelType | . |
ChannelType | Name of built-in or custom channel type (e.g. messaging, team, livestream) |
ChannelId | A unique identifier for the channel |
MessageRequest | Details of the message to be sent |
bSkipPush | Do not send a mobile push notification |
Callback | Called when response is received |
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.
MessageId | ID of the message to react to |
Type | The type of reaction (e.g. 'like', 'laugh', 'wow') |
bEnforceUnique | If true, new reaction will replace all reactions the user has (if any) on this message |
bSkipPush | Do not send a mobile push notification |
Score | Optionally include a score for the reaction |
Callback | Called when response is received |
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.
ChannelType | Name of built-in or custom channel type (e.g. messaging, team, livestream) |
ChannelId | A unique identifier for the channel |
Callback | Called when response is received. |
void FChatApi::StopWatchingChannel | ( | const FString & | ChannelType, |
const FString & | ChannelId, | ||
const FString & | ConnectionId, | ||
TCallback< FResponseDto > | Callback = {} |
||
) | const |
Stop receiving channel events.
ChannelType | Name of built-in or custom channel type (e.g. messaging, team, livestream) |
ChannelId | A unique identifier for the channel |
ConnectionId | Websocket connection ID to interact with. |
Callback | Called when response is received. |
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.
ChannelType | Name of built-in or custom channel type (e.g. messaging, team, livestream) |
ChannelId | A unique identifier for the channel |
bHardDelete | Actually delete messages, instead of soft-deleting (hiding) them |
TruncatedAt | Truncate this channel only up to given time |
Message | A system message to be added after truncation |
bSkipPush | If a message is included, don't send the push notification |
Callback | Called when response is received |
void FChatApi::UnbanUser | ( | const FString & | TargetUserId, |
const FString & | Type = {} , |
||
const FString & | Id = {} , |
||
TCallback< FResponseDto > | Callback = {} |
||
) | const |
Removes previously applied ban.
TargetUserId | ID of user to unban |
Type | Channel type to unban user in (optional, unban is app-wide otherwise) |
Id | Channel ID to unban user in (optional, unban is app-wide otherwise) |
Callback | Called when response is received. |
void FChatApi::UnmuteChannels | ( | const TArray< FString > & | TargetCids, |
TCallback< FResponseDto > | Callback = {} |
||
) | const |
Unmutes channel for user.
TargetCids | CIDs of channels to unmute |
Callback | Called when response is received. |
void FChatApi::UnmuteUsers | ( | const TArray< FString > & | TargetUserIds, |
TCallback< FResponseDto > | Callback = {} |
||
) | const |
Unmute a previously muted user.
TargetUserIds | User IDs to unmute |
Callback | Called when response is received. |
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.
ChannelType | Name of built-in or custom channel type (e.g. messaging, team, livestream) |
ChannelId | A unique identifier for the channel |
Data | Properties to set on the channel |
Callback | Called when response is received. |
void FChatApi::UpdateMessage | ( | const FMessageRequestDto & | MessageRequest, |
TCallback< FMessageResponseDto > | Callback = {} |
||
) | const |
Update the given message.
MessageRequest | Details of the message to update |
Callback | Called when response is received |
void FChatApi::UpsertUsers | ( | const TMap< FString, FUserObjectRequestDto > & | Users, |
TCallback< FUpdateUsersResponseDto > | Callback = {} |
||
) | const |
Update or create users in bulk.
Users | Map of user IDs to user objects |
Callback | Called when response is received. |