Chat API for chatting between users Unlike other servers which use HTTP, Chat server uses WebSocket (RFC 6455). More...
#include <AccelByteChatApi.h>
Public Member Functions | |
| Chat (Credentials &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelByteMessagingSystem &InMessagingSystemRef, FAccelByteNetworkConditioner &InNetworkConditionerRef, TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient=nullptr, float InPingDelay=30.f, float InInitialBackoffDelay=1.f, float InMaxBackoffDelay=30.f, float InTotalTimeout=60.f) | |
| Chat (Credentials &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelByteMessagingSystem &InMessagingSystemRef, FAccelByteNetworkConditioner &InNetworkConditionerRef, FAccelBytePlatformPtr const &InAccelBytePlatform, float InPingDelay=30.f, float InInitialBackoffDelay=1.f, float InMaxBackoffDelay=30.f, float InTotalTimeout=60.f) | |
| DECLARE_DELEGATE (FChatConnectSuccess) | |
| DECLARE_DELEGATE_OneParam (FChatDisconnectNotif, FAccelByteModelsChatDisconnectNotif const &) | |
| DECLARE_DELEGATE_OneParam (FChatRefreshTokenResponse, FAccelByteModelsChatRefreshTokenResponse const &) | |
| delegate for handling response when refreshing chat token. | |
| DECLARE_DELEGATE_OneParam (FSendChatResponse, FAccelByteModelsChatSendChatResponse const &) | |
| delegate for handling sent chat response. | |
| DECLARE_DELEGATE_OneParam (FQueryTopicResponse, FAccelByteModelsChatQueryTopicResponse const &) | |
| delegate for handling chat topic query response. | |
| DECLARE_DELEGATE_OneParam (FQueryTopicByIdResponse, FAccelByteModelsChatQueryTopicByIdResponse const &) | |
| delegate for handling chat topic query by id response. | |
| DECLARE_DELEGATE_OneParam (FQueryPublicTopicResponse, FAccelByteModelsChatQueryPublicTopicResponse const &) | |
| delegate for handling public topic query response. | |
| DECLARE_DELEGATE_OneParam (FQueryChatResponse, FAccelByteModelsChatQueryChatResponse const &) | |
| delegate for handling chat query response. | |
| DECLARE_DELEGATE_OneParam (FReadChatResponse, FAccelByteModelsChatReadChatResponse const &) | |
| delegate for handling read chat response. | |
| DECLARE_DELEGATE_OneParam (FChatBlockUserResponse, FAccelByteModelsChatBlockUserResponse const &) | |
| delegate for handling user block response. | |
| DECLARE_DELEGATE_OneParam (FChatUnblockUserResponse, FAccelByteModelsChatUnblockUserResponse const &) | |
| delegate for handling user unblock response. | |
| DECLARE_DELEGATE_OneParam (FChatActionTopicResponse, FAccelByteModelsChatActionTopicResponse const &) | |
| delegate for handling action chat topic response (create, update, delete, join, quit) | |
| DECLARE_DELEGATE_OneParam (FAddRemoveUserFromTopicResponse, FAccelByteModelsChatActionUserTopicResponse const &) | |
| delegate for handling add user to topic and remove user from topic response. | |
| DECLARE_DELEGATE_OneParam (FDeleteSystemMessagesResponse, FAccelByteModelsDeleteSystemMessagesResponse const &) | |
| delegate for handling delete system message(s) response. | |
| DECLARE_DELEGATE_OneParam (FUpdateSystemMessagesResponse, FAccelByteModelsUpdateSystemMessagesResponse const &) | |
| delegate for handling update system message(s) response. | |
| DECLARE_DELEGATE_OneParam (FQuerySystemMessageResponse, FAccelByteModelsQuerySystemMessagesResponse const &) | |
| delegate for handling query system message response. | |
| DECLARE_DELEGATE_OneParam (FGetSystemMessageStatsResponse, FAccelByteGetSystemMessageStatsResponse const &) | |
| DECLARE_DELEGATE_OneParam (FGetUserChatConfigurationResponse, FAccelByteModelsGetUserChatConfigurationResponse const &) | |
| DECLARE_DELEGATE_OneParam (FSetUserChatConfigurationResponse, FAccelByteSetUserChatConfigurationResponse const &) | |
| DECLARE_DELEGATE_OneParam (FChatNotif, FAccelByteModelsChatNotif const &) | |
| delegate for handling incoming chat notification. | |
| DECLARE_DELEGATE_OneParam (FReadChatNotif, FAccelByteModelsReadChatNotif const &) | |
| delegate for handling read chat notification. | |
| DECLARE_DELEGATE_OneParam (FAddRemoveFromTopicNotif, FAccelByteModelsChatUpdateUserTopicNotif const &) | |
| delegate for handling add to/ remove from topic notification. | |
| DECLARE_DELEGATE_OneParam (FDeleteUpdateTopicNotif, FAccelByteModelsChatUpdateTopicNotif const &) | |
| delegate for handling chat topic removal/update notification. | |
| DECLARE_DELEGATE_OneParam (FSystemMessageNotif, FAccelByteModelsChatSystemMessageNotif const &) | |
| delegate for handling chat incoming system messages. | |
| DECLARE_DELEGATE_OneParam (FUserBanUnbanNotif, FAccelByteModelsChatUserBanUnbanNotif const &) | |
| DECLARE_DELEGATE_OneParam (FUserMutedNotif, FAccelByteModelsChatMutedNotif const &) | |
| DECLARE_DELEGATE_OneParam (FUserUnmutedNotif, FAccelByteModelsChatUnmutedNotif const &) | |
| void | Connect () |
| Connect to the Chat server via websocket. | |
| void | Disconnect (bool ForceCleanup=false) |
| Disconnect from server if and only if the you have connected to server. If not currently connected, then this does nothing. | |
| bool | IsConnected () const |
| Check whether the websocket is currently connected to the Chat server. | |
| bool | IsReconnecting () const |
| Check whether the websocket is currently trying to reconnect to the Chat server. | |
| void | SendPing () |
| Send and empty string through the web socket connection. | |
| void | SetConnectSuccessDelegate (FChatConnectSuccess const &OnConnectSuccess) |
| Delegate setter for chat websocket connection success event. | |
| void | SetConnectFailedDelegate (FErrorHandler const &OnConnectError) |
| Delegate setter for chat websocket connection failure event. | |
| void | SetDisconnectNotifDelegate (FChatDisconnectNotif const &OnDisconnectNotif) |
| Delegate setter for chat websocket disconnected event. | |
| void | SetConnectionClosedDelegate (FChatConnectionClosed const &OnConnectionClosed) |
| Delegate setter for chat websocket connection closed event (connection closed by peer). | |
| FReconnectAttempted & | OnReconnectAttemptedMulticastDelegate () |
| Get a multicast delegate that will be triggered when an attempt to reconnect websocket has been done. | |
| FMassiveOutage & | OnMassiveOutageMulticastDelegate () |
| Get a multicast delegate that will be triggered when connection is down & can't be reestablished. Longer than usual. | |
| FString | RefreshToken (FString const &AccessToken, FChatRefreshTokenResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Refresh access token used in chat. | |
| void | UnbindEvent () |
| Unbind all delegates set previously. | |
| void | CreatePersonalTopic (FString const &TargetUserId, FChatActionTopicResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Create a personal chat topic between logged in user and a TargetUserid (chat members == 2). | |
| void | CreateGroupTopic (TSet< FString > const &Users, TSet< FString > const &Admins, FString const &TopicName, bool bIsJoinable, FChatActionTopicResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Create a chat topic between multiple users (chat members > 2). Deprecated. | |
| void | CreateGroupTopic (FAccelByteModelsChatCreateTopicRequest const &Request, FChatActionTopicResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Create a chat topic between multiple users (chat members > 2). Deprecated. | |
| void | UpdateTopic (FString const &TopicId, FString const &NewFriendlyTopicName, bool bIsJoinable, FChatActionTopicResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Update the topic information, only topic admin can use this operation. | |
| void | UpdateTopic (FAccelByteModelsChatUpdateTopicRequest const &Request, FChatActionTopicResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Update the topic information, only topic admin can use this operation. | |
| void | DeleteTopic (FString const &ToDeleteGroupTopicId, FChatActionTopicResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Delete the group topic id, only topic admin can use this operation. PERSONAL topic cannot be deleted. | |
| void | AddUserToTopic (FAccelByteModelsChatAddUserToTopicRequest const &Request, FAddRemoveUserFromTopicResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Add a new user to an existing GROUP topic id, only topic admin can use this operation. | |
| void | AddUserToTopic (FString const &TopicId, FString const &ToAddUserId, FAddRemoveUserFromTopicResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Add an user to an existing topic id, only topic admin can use this operation. | |
| void | RemoveUserFromTopic (FAccelByteModelsChatRemoveUserFromTopicRequest const &Request, FAddRemoveUserFromTopicResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Remove an user from an existing topic id, only topic admin can use this operation. | |
| void | RemoveUserFromTopic (FString const &TopicId, FString const &ToRemoveUserId, FAddRemoveUserFromTopicResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Remove an user from an existing topic id, only topic admin can use this operation. | |
| void | JoinTopic (FString const &TopicId, FChatActionTopicResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Join a joinable group topic. | |
| void | QuitTopic (FString const &TopicId, FChatActionTopicResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Leave a group topic. | |
| void | SendChat (FString const &TopicId, FString const &Message, FSendChatResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Create a personal chat topic between logged in user and a TargetUserid (chat members == 2). | |
| void | DeleteSystemMessages (TSet< FString > const &MessageIds, FDeleteSystemMessagesResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Delete system message(s) in user system inbox. | |
| void | UpdateSystemMessages (TArray< FAccelByteModelsActionUpdateSystemMessage > const &ActionUpdateSystemMessages, FUpdateSystemMessagesResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Update system message(s) in user system inbox. | |
| void | QuerySystemMessage (FQuerySystemMessageResponse const &OnSuccess, FErrorHandler const &OnError=nullptr, FQuerySystemMessageOptions const &OptionalParams={}) |
| Query system messages in user's system inbox. | |
| void | GetSystemMessageStats (FGetSystemMessageStatsResponse const &OnSuccess, FErrorHandler const &OnError, FAccelByteGetSystemMessageStatsRequest const &Request={}) |
| void | QueryPersonalTopic (int Offset, int Limit, FQueryTopicResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Query PERSONAL chat topics that the logged in user is a member of. | |
| void | QueryGroupTopic (FAccelByteModelsChatQueryTopicRequest const &Request, FQueryTopicResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Query GROUP chat topics that the logged in user is a member of. | |
| void | QueryGroupTopic (FString const &Keyword, int Offset, int Limit, FQueryTopicResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Query GROUP chat topics that are subscribed by the logged in user. | |
| void | QueryTopic (FAccelByteModelsChatQueryTopicRequest const &Request, FQueryTopicResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Query chat topics (PERSONAL and GROUP, excluding PUBLIC) that are subscribed by the logged in user. | |
| void | QueryTopic (FString const &Keyword, int Offset, int Limit, FQueryTopicResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Query chat topics (PERSONAL and GROUP, excluding PUBLIC) that are subscribed by the logged in user. | |
| void | QueryTopicById (FString const &TopicId, FQueryTopicByIdResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Query chat topics (PERSONAL and GROUP, excluding PUBLIC) that are subscribed by the logged in user By using Id as keyword instead of group name. | |
| void | QueryPublicTopic (FAccelByteModelsChatQueryTopicRequest const &Request, FQueryPublicTopicResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Query PUBLIC (joinable) chat topics (server topic / channel). | |
| void | QueryChat (FAccelByteModelsChatQueryChatRequest const &Request, FQueryChatResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Query chat messages that are subscribed by the logged in user. | |
| void | QueryChat (FString const &TopicId, int Limit, FQueryChatResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Query chat messages that are subscribed by the logged in user. | |
| void | ReadChat (TSet< FString > const &ChatIds, FReadChatResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Flag the supplied ChatIds as has been read. | |
| void | BlockUser (FString const &UserId, FChatBlockUserResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Block user from chatting. | |
| void | UnblockUser (FString const &UserId, FChatUnblockUserResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Unblock user from chatting. | |
| FAccelByteTaskWPtr | DeleteGroupChat (FString const &GroupId, FString const &ChatId, FVoidHandler const &OnSuccess, FErrorHandler const &OnError) |
| Delete a message from group chat (used by group moderator). | |
| FAccelByteTaskWPtr | MuteGroupUserChat (FString const &GroupId, FString const &UserId, int32 DurationInSeconds, FVoidHandler const &OnSuccess, FErrorHandler const &OnError) |
| Mute user from group chat (used by group moderator). | |
| FAccelByteTaskWPtr | UnmuteGroupUserChat (FString const &GroupId, FString const &UserId, FVoidHandler const &OnSuccess, FErrorHandler const &OnError) |
| Unmute user from group chat (used by group moderator). | |
| FAccelByteTaskWPtr | GetGroupChatSnapshot (FString const &GroupId, FString const &ChatId, THandler< FAccelByteModelsChatSnapshotResponse > const &OnSuccess, FErrorHandler const &OnError) |
| Get chat snapshot (used by group moderator). | |
| FAccelByteTaskWPtr | BanGroupUserChat (FString const &GroupId, TArray< FString > const &UserIds, THandler< FAccelByteModelsBanGroupChatResponse > const &OnSuccess, FErrorHandler const &OnError) |
| Ban users from group chat (used by group moderator). | |
| FAccelByteTaskWPtr | UnbanGroupUserChat (FString const &GroupId, TArray< FString > const &UserIds, THandler< FAccelByteModelsUnbanGroupChatResponse > const &OnSuccess, FErrorHandler const &OnError) |
| Unban users from group chat (used by group moderator). | |
| void | GetUserChatConfiguration (FGetUserChatConfigurationResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Get chat configuration for current user. | |
| void | SetUserChatConfiguration (const FAccelByteModelsSetUserChatConfigurationRequest &Request, FSetUserChatConfigurationResponse const &OnSuccess, FErrorHandler const &OnError=nullptr) |
| Set chat configuration for current user. | |
| void | SetChatNotifDelegate (FChatNotif const &Delegate) |
| Delegate setter for incoming chat message event. | |
| void | SetAddToTopicNotifDelegate (FAddRemoveFromTopicNotif const &Delegate) |
| Delegate setter for logged in user added to a topic event. | |
| void | SetRemoveFromTopicNotifDelegate (FAddRemoveFromTopicNotif const &Delegate) |
| Delegate setter for logged in user removed from a topic event. | |
| void | SetDeleteTopicNotifDelegate (FDeleteUpdateTopicNotif const &Delegate) |
| Delegate setter for when a subscribed topic is deleted. | |
| void | SetUpdateTopicNotifDelegate (FDeleteUpdateTopicNotif const &Delegate) |
| Delegate setter for when a subscribed topic is updated. | |
| void | SetReadChatNotifDelegate (FReadChatNotif const &Delegate) |
| Delegate setter for when a subscribed topic's chat has been read by others. | |
| void | SetUserBanNotifDelegate (FUserBanUnbanNotif const &Delegate) |
| Delegate setter for when user received ban event. | |
| void | SetSystemMessageNotifDelegate (FSystemMessageNotif const &Delegate) |
| Delegate setter for when user received a System message. | |
| void | SetUserUnbanNotifDelegate (FUserBanUnbanNotif const &Delegate) |
| Delegate setter for when user received unban event. | |
| void | SetUserMutedNotifDelegate (FUserMutedNotif const &Delegate) |
| Delegate setter for when user received muted event. | |
| void | SetUserUnmutedNotifDelegate (FUserUnmutedNotif const &Delegate) |
| Delegate setter for when user received unmuted event. | |
| FAccelByteTaskWPtr | GetChatConfig (THandler< FAccelByteModelsChatPublicConfigResponse > const &OnSuccess, FErrorHandler const &OnError) |
| Get chat config of a namespace. | |
| Public Member Functions inherited from AccelByte::FApiBase | |
| FApiBase (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient) | |
| FApiBase (Credentials const &InCredentialsRef, Settings const &InSettingsRef, FHttpRetrySchedulerBase &InHttpRef, FAccelBytePlatformPtr const &InAccelBytePlatform) | |
| void | SetApiClient (TSharedPtr< AccelByte::FApiClient, ESPMode::ThreadSafe > const &InApiClient) |
| Public Member Functions inherited from AccelByte::IWebsocketConfigurableReconnectStrategy | |
| void | SetDefaultReconnectionStrategy (const FReconnectionStrategy &Strategy) |
| FReconnectionStrategy & | GetDefaultReconnectionStrategy () |
| TMap< int32, FReconnectionStrategy > & | GetReconnectionStrategyDictionary () |
| void | SetSpecificReconnectionStrategy (EWebsocketClosureCodeForSpecificRetry WebsocketDisconnectionCode, const FReconnectionStrategy &Strategy) |
| void | SetSpecificReconnectionStrategy (int32 RawWebsocketConnectionCode, const FReconnectionStrategy &Strategy) |
Additional Inherited Members | |
| Protected Member Functions inherited from AccelByte::FApiBase | |
| template<typename T> | |
| bool | ValidateAccelByteId (FString const &Id, EAccelByteIdHypensRule HypenRule, FString const &ErrorMessage, T const &OnError) |
| Protected Attributes inherited from AccelByte::FApiBase | |
| TSharedRef< Credentials const, ESPMode::ThreadSafe > | CredentialsRef |
| Settings const & | SettingsRef |
| FHttpRetrySchedulerBase & | HttpRef |
| FHttpClient | HttpClient |
| FAccelBytePlatformPtr | AccelBytePlatformPtr |
Chat API for chatting between users Unlike other servers which use HTTP, Chat server uses WebSocket (RFC 6455).
Chat service enables user to send message to other user / group of user. We use topic as wrapper for chat connection. Topic can have two different types:
| void AccelByte::Api::Chat::AddUserToTopic | ( | FAccelByteModelsChatAddUserToTopicRequest const & | Request, |
| FAddRemoveUserFromTopicResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Add a new user to an existing GROUP topic id, only topic admin can use this operation.
| Request | - Parameter request in struct form for adding a user to a group topic |
| OnSuccess | - Callback for successful chat topic user addition response |
| OnError | - Callback for failed chat topic user addition |
|
inline |
Add an user to an existing topic id, only topic admin can use this operation.
| TopicId | - Topic id that will receive the new user |
| ToAddUserId | - User Id that will be added to the topic |
| OnSuccess | - Callback for successful chat topic user addition response |
| OnError | - Callback for failed chat topic user addition |
| FAccelByteTaskWPtr AccelByte::Api::Chat::BanGroupUserChat | ( | FString const & | GroupId, |
| TArray< FString > const & | UserIds, | ||
| THandler< FAccelByteModelsBanGroupChatResponse > const & | OnSuccess, | ||
| FErrorHandler const & | OnError ) |
Ban users from group chat (used by group moderator).
| GroupId | Id of group from group service. |
| UserIds | Array of user ids to ban. |
| OnSuccess | Called when the operation succeeded. |
| OnError | Called when the operation failed. |
| void AccelByte::Api::Chat::BlockUser | ( | FString const & | UserId, |
| FChatBlockUserResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Block user from chatting.
| UserId | - User ID to block |
| OnSuccess | - Callback for successful block user response |
| OnError | - Callback for failed block user |
| void AccelByte::Api::Chat::Connect | ( | ) |
Connect to the Chat server via websocket.
| void AccelByte::Api::Chat::CreateGroupTopic | ( | FAccelByteModelsChatCreateTopicRequest const & | Request, |
| FChatActionTopicResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Create a chat topic between multiple users (chat members > 2). Deprecated.
| Request | - Parameter request in struct form for creating a group topic |
| OnSuccess | - Callback for successful chat topic creation response |
| OnError | - Callback for failed chat topic creation |
|
inline |
Create a chat topic between multiple users (chat members > 2). Deprecated.
| Users | - UserIds to be added to the chat topic, self/logged in user is automatically added as first user |
| Admins | - UserIds to be added to the chat topic as admin , self/logged in user is automatically added as admin |
| TopicName | - Friendly name of the chat topic (alias) |
| bIsJoinable | - Whether new user can join this group topic without invitation from admin |
| OnSuccess | - Callback for successful chat topic creation response |
| OnError | - Callback for failed chat topic creation |
| void AccelByte::Api::Chat::CreatePersonalTopic | ( | FString const & | TargetUserId, |
| FChatActionTopicResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Create a personal chat topic between logged in user and a TargetUserid (chat members == 2).
| TargetUserId | - User id for 2nd member of the personal chat topic (1st member is self/logged in user) |
| OnSuccess | - Callback for successful chat topic creation response |
| OnError | - Callback for failed chat topic creation |
| AccelByte::Api::Chat::DECLARE_DELEGATE_OneParam | ( | FGetSystemMessageStatsResponse | , |
| FAccelByteGetSystemMessageStatsResponse const & | ) |
Delegate for handling get system message stats response.
| AccelByte::Api::Chat::DECLARE_DELEGATE_OneParam | ( | FGetUserChatConfigurationResponse | , |
| FAccelByteModelsGetUserChatConfigurationResponse const & | ) |
Delegate for handling get user chat configuration response.
| AccelByte::Api::Chat::DECLARE_DELEGATE_OneParam | ( | FSetUserChatConfigurationResponse | , |
| FAccelByteSetUserChatConfigurationResponse const & | ) |
Delegate for handling set user chat configuration response.
| FAccelByteTaskWPtr AccelByte::Api::Chat::DeleteGroupChat | ( | FString const & | GroupId, |
| FString const & | ChatId, | ||
| FVoidHandler const & | OnSuccess, | ||
| FErrorHandler const & | OnError ) |
Delete a message from group chat (used by group moderator).
| GroupId | Id of group from group service. |
| ChatId | Id of message to delete. |
| OnSuccess | Called when the operation succeeded. |
| OnError | Called when the operation failed. |
| void AccelByte::Api::Chat::DeleteSystemMessages | ( | TSet< FString > const & | MessageIds, |
| FDeleteSystemMessagesResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Delete system message(s) in user system inbox.
| MessageIds | - Array of system message id |
| OnSuccess | - Callback for successful deleted system message(s) in user system inbox |
| OnError | - Callback for failed deleted system message(s) in user system inbox |
| void AccelByte::Api::Chat::DeleteTopic | ( | FString const & | ToDeleteGroupTopicId, |
| FChatActionTopicResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Delete the group topic id, only topic admin can use this operation. PERSONAL topic cannot be deleted.
| ToDeleteGroupTopicId | - Group Topic id that will be deleted. PERSONAL topic cannot be deleted |
| OnSuccess | - Callback for successful group chat topic deletion response |
| OnError | - Callback for failed chat topic deletion |
| void AccelByte::Api::Chat::Disconnect | ( | bool | ForceCleanup = false | ) |
Disconnect from server if and only if the you have connected to server. If not currently connected, then this does nothing.
| ForceCleanup | boolean flag to forcefully cleanup the WebSocket connection |
| FAccelByteTaskWPtr AccelByte::Api::Chat::GetChatConfig | ( | THandler< FAccelByteModelsChatPublicConfigResponse > const & | OnSuccess, |
| FErrorHandler const & | OnError ) |
Get chat config of a namespace.
| OnSuccess | Called when the operation succeeded. |
| OnError | Called when the operation failed. |
| FAccelByteTaskWPtr AccelByte::Api::Chat::GetGroupChatSnapshot | ( | FString const & | GroupId, |
| FString const & | ChatId, | ||
| THandler< FAccelByteModelsChatSnapshotResponse > const & | OnSuccess, | ||
| FErrorHandler const & | OnError ) |
Get chat snapshot (used by group moderator).
| GroupId | Id of group from group service. |
| ChatId | Id of message. |
| OnSuccess | Called when the operation succeeded. |
| OnError | Called when the operation failed. |
| void AccelByte::Api::Chat::GetSystemMessageStats | ( | FGetSystemMessageStatsResponse const & | OnSuccess, |
| FErrorHandler const & | OnError, | ||
| FAccelByteGetSystemMessageStatsRequest const & | Request = {} ) |
Get system message stats (number of unread messages and date time of oldest unread message)
| OnSuccess | - Callback for successful get system message stats |
| OnError | - Callback for failed get system message stats |
| Request | - Optional request parameters |
| void AccelByte::Api::Chat::GetUserChatConfiguration | ( | FGetUserChatConfigurationResponse const & | OnSuccess, |
| FErrorHandler const & | OnError = nullptr ) |
Get chat configuration for current user.
| OnSuccess | - Callback for successful get user chat configuration. |
| OnError | - Callback for failed get user chat configuration. |
| bool AccelByte::Api::Chat::IsConnected | ( | ) | const |
Check whether the websocket is currently connected to the Chat server.
| bool AccelByte::Api::Chat::IsReconnecting | ( | ) | const |
Check whether the websocket is currently trying to reconnect to the Chat server.
| void AccelByte::Api::Chat::JoinTopic | ( | FString const & | TopicId, |
| FChatActionTopicResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Join a joinable group topic.
| TopicId | - Joinable group topic id |
| OnSuccess | - Callback for successful join |
| OnError | - Callback for failed join |
| FAccelByteTaskWPtr AccelByte::Api::Chat::MuteGroupUserChat | ( | FString const & | GroupId, |
| FString const & | UserId, | ||
| int32 | DurationInSeconds, | ||
| FVoidHandler const & | OnSuccess, | ||
| FErrorHandler const & | OnError ) |
Mute user from group chat (used by group moderator).
| GroupId | Id of group from group service. |
| UserId | Id of the user to be muted. |
| DurationInSeconds | Duration of mute in seconds. |
| OnSuccess | Called when the operation succeeded. |
| OnError | Called when the operation failed. |
| void AccelByte::Api::Chat::QueryChat | ( | FAccelByteModelsChatQueryChatRequest const & | Request, |
| FQueryChatResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Query chat messages that are subscribed by the logged in user.
| OnSuccess | - Callback for successful topic query response |
| OnError | - Callback for failed topic query |
|
inline |
Query chat messages that are subscribed by the logged in user.
| TopicId | - target topic from which the chats are being queried |
| Limit | - max count of returned results from the most recent |
| OnSuccess | - Callback for successful topic query response |
| OnError | - Callback for failed topic query |
| void AccelByte::Api::Chat::QueryGroupTopic | ( | FAccelByteModelsChatQueryTopicRequest const & | Request, |
| FQueryTopicResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Query GROUP chat topics that the logged in user is a member of.
| Request | - Parameter request in struct form |
| OnSuccess | - Callback for successful personal topic query response |
| OnError | - Callback for failed personal topic query |
|
inline |
Query GROUP chat topics that are subscribed by the logged in user.
if user has sequential 100 topics, 1 is oldest, 100 is most recent result will be returned from most recent. so in this order: 100 - 1
| Keyword | - Friendly name keyword for the topic, e.g. "gg guild" |
| Offset | - Result offset from most recent. e.g. if user has 100 topics, offset 25 means result will start from 75 |
| Limit | - Max count of returned results from the most recent e.g. if user has 100 topics, limit 20 will only return the last 20 (100-81) |
| OnSuccess | - Callback for successful group topic query response |
| OnError | - Callback for failed group topic query |
| void AccelByte::Api::Chat::QueryPersonalTopic | ( | int | Offset, |
| int | Limit, | ||
| FQueryTopicResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Query PERSONAL chat topics that the logged in user is a member of.
if user has sequential 100 topics, 1 is oldest, 100 is most recent result will be returned from most recent. so in this order: 100 - 1
| Offset | - Result offset from most recent. e.g. if user has 100 topics, offset 25 means result will start from 75 |
| Limit | - Max count of returned results from the most recent e.g. if user has 100 topics, limit 20 will only return the last 20 (100-81) |
| OnSuccess | - Callback for successful personal topic query response |
| OnError | - Callback for failed personal topic query |
| void AccelByte::Api::Chat::QueryPublicTopic | ( | FAccelByteModelsChatQueryTopicRequest const & | Request, |
| FQueryPublicTopicResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Query PUBLIC (joinable) chat topics (server topic / channel).
| Request | - Parameter request in struct form |
| OnSuccess | - Callback for successful topic query response |
| OnError | - Callback for failed topic query |
| void AccelByte::Api::Chat::QuerySystemMessage | ( | FQuerySystemMessageResponse const & | OnSuccess, |
| FErrorHandler const & | OnError = nullptr, | ||
| FQuerySystemMessageOptions const & | OptionalParams = {} ) |
Query system messages in user's system inbox.
| OnSuccess | - Callback for successful deleted system message(s) in user system inbox |
| OnError | - Callback for failed updated system message(s) in user system inbox |
| OptionalParams | - Optional parameters for query inbox message |
| void AccelByte::Api::Chat::QueryTopic | ( | FAccelByteModelsChatQueryTopicRequest const & | Request, |
| FQueryTopicResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Query chat topics (PERSONAL and GROUP, excluding PUBLIC) that are subscribed by the logged in user.
| Request | - Parameter request in struct form |
| OnSuccess | - Callback for successful topic query response |
| OnError | - Callback for failed topic query |
|
inline |
Query chat topics (PERSONAL and GROUP, excluding PUBLIC) that are subscribed by the logged in user.
if user has sequential 100 topics, 1 is oldest, 100 is most recent result will be returned from most recent. so in this order: 100 - 1
| Keyword | Friendly name keyword for the topic, only relevant for topic topic and not personal topic e.g. "gg guild" |
| Offset | - Result offset from most recent. e.g. if user has 100 topics, offset 25 means result will start from 75 |
| Limit | - Max count of returned results from the most recent e.g. if user has 100 topics, limit 20 will only return the last 20 (100-81) |
| OnSuccess | - Callback for successful topic query response |
| OnError | - Callback for failed topic query |
| void AccelByte::Api::Chat::QueryTopicById | ( | FString const & | TopicId, |
| FQueryTopicByIdResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Query chat topics (PERSONAL and GROUP, excluding PUBLIC) that are subscribed by the logged in user By using Id as keyword instead of group name.
| TopicId | - Parameter request in struct form |
| OnSuccess | - Callback for successful topic query response |
| OnError | - Callback for failed topic query |
| void AccelByte::Api::Chat::QuitTopic | ( | FString const & | TopicId, |
| FChatActionTopicResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Leave a group topic.
| TopicId | - Group topic id that the logged in user is leaving |
| OnSuccess | - Callback for successful quit |
| OnError | - Callback for failed quit |
| void AccelByte::Api::Chat::ReadChat | ( | TSet< FString > const & | ChatIds, |
| FReadChatResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
| FString AccelByte::Api::Chat::RefreshToken | ( | FString const & | AccessToken, |
| FChatRefreshTokenResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Refresh access token used in chat.
| AccessToken | new access token to be used in chat |
| OnSuccess | delegate to be triggered when operation success |
| OnError | delegate to be triggered when operation error |
| void AccelByte::Api::Chat::RemoveUserFromTopic | ( | FAccelByteModelsChatRemoveUserFromTopicRequest const & | Request, |
| FAddRemoveUserFromTopicResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Remove an user from an existing topic id, only topic admin can use this operation.
| Request | - Parameter request in struct form for removing an existing member from a group topic |
| OnSuccess | - Callback for successful chat topic user removal response |
| OnError | - Callback for failed chat topic user removal |
|
inline |
Remove an user from an existing topic id, only topic admin can use this operation.
| TopicId | - Topic id that will remove an existing user |
| ToRemoveUserId | - User Id that will be removed from the topic |
| OnSuccess | - Callback for successful chat topic user removal response |
| OnError | - Callback for failed chat topic user removal |
| void AccelByte::Api::Chat::SendChat | ( | FString const & | TopicId, |
| FString const & | Message, | ||
| FSendChatResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Create a personal chat topic between logged in user and a TargetUserid (chat members == 2).
| TopicId | - a chat topic's topic id as chat destination |
| Message | - Chat message to be send |
| OnSuccess | - Callback for successful sent chat response |
| OnError | - Callback for failed sent chat |
|
inline |
Delegate setter for chat websocket connection failure event.
| OnConnectError | Callback delegate when failed connecting to Chat Websocket. |
|
inline |
Delegate setter for chat websocket connection closed event (connection closed by peer).
| OnConnectionClosed | Callback delegate when connection closed from Chat Websocket. |
|
inline |
Delegate setter for chat websocket connection success event.
| OnConnectSuccess | Callback delegate when successfully connected to Chat Websocket. |
|
inline |
Delegate setter for chat websocket disconnected event.
| OnDisconnectNotif | Notification Delegate when disconnected from Chat Websocket. |
| void AccelByte::Api::Chat::SetUserChatConfiguration | ( | const FAccelByteModelsSetUserChatConfigurationRequest & | Request, |
| FSetUserChatConfigurationResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Set chat configuration for current user.
| Request | - The chat configuration. |
| OnSuccess | - Callback for successful set user chat configuration. |
| OnError | - Callback for failed set user chat configuration. |
| FAccelByteTaskWPtr AccelByte::Api::Chat::UnbanGroupUserChat | ( | FString const & | GroupId, |
| TArray< FString > const & | UserIds, | ||
| THandler< FAccelByteModelsUnbanGroupChatResponse > const & | OnSuccess, | ||
| FErrorHandler const & | OnError ) |
Unban users from group chat (used by group moderator).
| GroupId | Id of group from group service. |
| UserIds | Array of user ids to unban. |
| OnSuccess | Called when the operation succeeded. |
| OnError | Called when the operation failed. |
| void AccelByte::Api::Chat::UnblockUser | ( | FString const & | UserId, |
| FChatUnblockUserResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Unblock user from chatting.
| UserId | - User ID to unblock |
| OnSuccess | - Callback for successful block user response |
| OnError | - Callback for failed Unblock user |
| FAccelByteTaskWPtr AccelByte::Api::Chat::UnmuteGroupUserChat | ( | FString const & | GroupId, |
| FString const & | UserId, | ||
| FVoidHandler const & | OnSuccess, | ||
| FErrorHandler const & | OnError ) |
Unmute user from group chat (used by group moderator).
| GroupId | Id of group from group service. |
| UserId | Id of the user to be un-muted. |
| OnSuccess | Called when the operation succeeded. |
| OnError | Called when the operation failed. |
| void AccelByte::Api::Chat::UpdateSystemMessages | ( | TArray< FAccelByteModelsActionUpdateSystemMessage > const & | ActionUpdateSystemMessages, |
| FUpdateSystemMessagesResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Update system message(s) in user system inbox.
| ActionUpdateSystemMessages | - Array of ActionUpdateSystemMessage containing action to mark read/unread and keep |
| OnSuccess | - Callback for successful deleted system message(s) in user system inbox |
| OnError | - Callback for failed updated system message(s) in user system inbox |
| void AccelByte::Api::Chat::UpdateTopic | ( | FAccelByteModelsChatUpdateTopicRequest const & | Request, |
| FChatActionTopicResponse const & | OnSuccess, | ||
| FErrorHandler const & | OnError = nullptr ) |
Update the topic information, only topic admin can use this operation.
| Request | - Parameter request in struct form for updating a group topic |
| OnSuccess | - Callback for successful chat topic update response |
| OnError | - Callback for failed chat topic update |
|
inline |
Update the topic information, only topic admin can use this operation.
| TopicId | - To update topic id |
| NewFriendlyTopicName | - new alias for the topic id |
| bIsJoinable | - Whether new user can join this group topic without invitation from admin |
| OnSuccess | - Callback for successful chat topic update response |
| OnError | - Callback for failed chat topic update |