Loading...
Searching...
No Matches
FOnlineChatAccelByte Class Reference
Inheritance diagram for FOnlineChatAccelByte:

Public Member Functions

 FOnlineChatAccelByte (FOnlineSubsystemAccelByte *InSubsystem)
 DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, OnConnectChatComplete, bool, const FUniqueNetId &, const FString &)
 DEFINE_ONLINE_PLAYER_DELEGATE_ONE_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnChatReconnectAttempted, const AccelByte::FReconnectAttemptInfo &)
 DEFINE_ONLINE_PLAYER_DELEGATE_ONE_PARAM (MAX_LOCAL_PLAYERS, AccelByteOnChatMassiveOutageEvent, const AccelByte::FMassiveOutageInfo &)
bool Connect (int32 LocalUserNum)
virtual bool CreateRoom (const FUniqueNetId &UserId, const FChatRoomId &RoomId, const FString &Nickname, const FChatRoomConfig &ChatRoomConfig) override
virtual bool CreateRoom (const FUniqueNetId &UserId, const FString &Nickname, const FAccelByteChatRoomConfig &ChatRoomConfig)
virtual bool ConfigureRoom (const FUniqueNetId &UserId, const FChatRoomId &RoomId, const FChatRoomConfig &ChatRoomConfig) override
virtual bool ConfigureRoom (const FUniqueNetId &UserId, const FChatRoomId &RoomId, const FAccelByteChatRoomConfig &ChatRoomConfig)
virtual bool JoinPublicRoom (const FUniqueNetId &UserId, const FChatRoomId &RoomId, const FString &Nickname, const FChatRoomConfig &ChatRoomConfig) override
virtual bool JoinPrivateRoom (const FUniqueNetId &UserId, const FChatRoomId &RoomId, const FString &Nickname, const FChatRoomConfig &ChatRoomConfig) override
virtual bool ExitRoom (const FUniqueNetId &UserId, const FChatRoomId &RoomId) override
virtual bool SendRoomChat (const FUniqueNetId &UserId, const FChatRoomId &RoomId, const FString &MsgBody) override
virtual bool SendPrivateChat (const FUniqueNetId &UserId, const FUniqueNetId &RecipientId, const FString &MsgBody) override
bool DeleteSystemMessages (const FUniqueNetId &UserId, const TSet< FString > &MessageIds)
bool UpdateSystemMessages (const FUniqueNetId &UserId, const TArray< FAccelByteModelsActionUpdateSystemMessage > &ActionUpdateSystemMessages)
bool QuerySystemMessage (const FUniqueNetId &UserId, const FQuerySystemMessageOptions &OptionalParams={})
bool QueryTransientSystemMessage (const FUniqueNetId &UserId, const FQuerySystemMessageOptions &OptionalParams={})
bool GetSystemMessageStats (const FUniqueNetId &UserId, const FAccelByteGetSystemMessageStatsRequest &Request={})
bool GetChatConfig (int32 LocalUserNum)
bool GetChatConfig (const FUniqueNetId &UserId)
bool GetUserConfiguration (const int32 LocalUserNum)
bool GetUserConfiguration (const FUniqueNetId &UserId)
bool SetUserConfiguration (const int32 LocalUserNum, const FAccelByteModelsSetUserChatConfigurationRequest &Configuration)
bool SetUserConfiguration (const FUniqueNetId &UserId, const FAccelByteModelsSetUserChatConfigurationRequest &Configuration)
bool ReportChatMessage (const FUniqueNetId &UserId, const TSharedRef< FChatMessage > &Message, const FString &Reason, const FString &Comment, FOnReportChatMessageComplete CompletionDelegate)
virtual bool IsChatAllowed (const FUniqueNetId &UserId, const FUniqueNetId &RecipientId) const override
virtual void GetJoinedRooms (const FUniqueNetId &UserId, TArray< FChatRoomId > &OutRooms) override
virtual TSharedPtr< FChatRoomInfo > GetRoomInfo (const FUniqueNetId &UserId, const FChatRoomId &RoomId) override
virtual bool GetMembers (const FUniqueNetId &UserId, const FChatRoomId &RoomId, TArray< TSharedRef< FChatRoomMember > > &OutMembers) override
virtual TSharedPtr< FChatRoomMember > GetMember (const FUniqueNetId &UserId, const FChatRoomId &RoomId, const FUniqueNetId &MemberId) override
virtual bool GetLastMessages (const FUniqueNetId &UserId, const FChatRoomId &RoomId, int32 NumMessages, TArray< TSharedRef< FChatMessage > > &OutMessages) override
virtual bool IsMessageFromLocalUser (const FUniqueNetId &UserId, const FChatMessage &Message, const bool bIncludeExternalInstances) override
virtual void DumpChatState () const override
bool IsJoinedTopic (const FString &UserId, const FString &TopicId)
bool HasPersonalChat (const FString &FromUserId, const FString &ToUserId)
TOptional< FString > GetPersonalChatTopicId (const FString &FromUserId, const FString &ToUserId)
bool QueryChatRoom (const FUniqueNetId &PlayerId, const FAccelByteModelsChatQueryTopicRequest &Request, const FOnChatQueryRoomComplete &OnComplete)
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (OnChatDisconnected, FString)
 DEFINE_ONLINE_DELEGATE_FOUR_PARAM (OnSendChatComplete, FString, FString, FString, bool)
 DEFINE_ONLINE_DELEGATE_FIVE_PARAM (OnSendChatCompleteWithError, FString, FString, FString, bool, const FOnlineError &)
 DEFINE_ONLINE_DELEGATE_ONE_PARAM (OnReadChatReceived, TArray< FAccelByteModelsChatReadChatData >)
 DEFINE_ONLINE_DELEGATE_THREE_PARAM (OnTopicAdded, FString, FString, FString)
 DEFINE_ONLINE_DELEGATE_THREE_PARAM (OnTopicRemoved, FString, FString, FString)
 DEFINE_ONLINE_DELEGATE_FOUR_PARAM (OnTopicUpdated, FString, FString, FString, bool)
 DEFINE_ONLINE_DELEGATE_FOUR_PARAM (OnTopicDeleted, FString, FString, FString, bool)
 DEFINE_ONLINE_DELEGATE_FIVE_PARAM (OnUserBanned, FString, EBanType, FString, EBanReason, bool)
 DEFINE_ONLINE_DELEGATE_FIVE_PARAM (OnUserUnbanned, FString, EBanType, FString, EBanReason, bool)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnSystemMessageReceived, const FUniqueNetId &, const FSystemMessageNotifMessage &)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnTransientSystemMessageReceived, const FUniqueNetId &, const FAccelByteModelsChatSystemMessageNotif &)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnDeleteSystemMessagesComplete, const FUniqueNetId &, const FOnlineError &)
 DEFINE_ONLINE_DELEGATE_TWO_PARAM (OnUpdateSystemMessagesComplete, const FUniqueNetId &, const FOnlineError &)
 DEFINE_ONLINE_DELEGATE_THREE_PARAM (OnQuerySystemMessageComplete, const FUniqueNetId &, const TArray< FSystemMessageNotifMessage > &, const FOnlineError &)
 DEFINE_ONLINE_DELEGATE_THREE_PARAM (OnQueryTransientSystemMessageComplete, const FUniqueNetId &, const TArray< FAccelByteModelsQuerySystemMessagesResponseItem > &, const FOnlineError &)
 DEFINE_ONLINE_DELEGATE_THREE_PARAM (OnGetSystemMessageStatsComplete, const FUniqueNetId &, const FAccelByteGetSystemMessageStatsResponse &, const FOnlineError &)
 DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, OnGetChatConfigComplete, bool, const FAccelByteModelsChatPublicConfigResponse &, const FString &)
 DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM (MAX_LOCAL_PLAYERS, OnChatConnectionClosed, int32, const FString &, bool)
void RegisterChatDelegates (int32 LocalUserNum)
void RemoveMemberFromTopic (const FString &UserId, const FString &TopicId)
void AddTopic (const FAccelByteChatRoomInfoRef &ChatRoomInfo)
void RemoveTopic (const FString &TopicId)
FAccelByteChatRoomInfoPtr GetTopic (const FString &TopicId)
void AddChatRoomMembers (TArray< FAccelByteUserInfoRef > Users)
void AddChatMessage (FUniqueNetIdAccelByteUserRef AccelByteUserId, const FChatRoomId &ChatRoomId, TSharedRef< FChatMessage > ChatMessage)
FAccelByteChatRoomMemberRef GetAccelByteChatRoomMember (const FString &UserId)
void SetMaxChatMessageLength (int32 InMaxChatMessageLength)
int32 GetMaxChatMessageLength () const

Static Public Member Functions

static bool GetFromSubsystem (const IOnlineSubsystem *Subsystem, TSharedPtr< FOnlineChatAccelByte, ESPMode::ThreadSafe > &OutInterfaceInstance)
static bool GetFromSubsystem (FOnlineSubsystemAccelByte *Subsystem, TSharedPtr< FOnlineChatAccelByte, ESPMode::ThreadSafe > &OutInterfaceInstance)
static bool GetFromWorld (const UWorld *World, TSharedPtr< FOnlineChatAccelByte, ESPMode::ThreadSafe > &OutInterfaceInstance)
static FString SessionV2IdToChatTopicId (const FString &SessionId)
static FString PartyV2IdToChatTopicId (const FString &PartyId)
static FString PartyV1IdToChatTopicId (const FString &PartyId)
static FString PersonalChatTopicId (const FString &FromUserId, const FString &ToUserId)
static EAccelByteChatRoomType GetChatRoomType (const FString &TopicId)

Public Attributes

PACKAGE_SCOPE : void QueryRoomAfterChatConnectEstablished(const FUniqueNetId& PlayerId)

Member Function Documentation

◆ AddChatMessage()

void FOnlineChatAccelByte::AddChatMessage ( FUniqueNetIdAccelByteUserRef AccelByteUserId,
const FChatRoomId & ChatRoomId,
TSharedRef< FChatMessage > ChatMessage )

Add Chat message to cache

◆ AddChatRoomMembers()

void FOnlineChatAccelByte::AddChatRoomMembers ( TArray< FAccelByteUserInfoRef > Users)

Add Chat Room Member Information to cache

◆ AddTopic()

void FOnlineChatAccelByte::AddTopic ( const FAccelByteChatRoomInfoRef & ChatRoomInfo)

Add topic to cache. Called on after connect success

◆ ConfigureRoom() [1/2]

bool FOnlineChatAccelByte::ConfigureRoom ( const FUniqueNetId & UserId,
const FChatRoomId & RoomId,
const FAccelByteChatRoomConfig & ChatRoomConfig )
virtual

Update a room's configuration

Parameters
UserIdID of the user updating the chat room
RoomIdThe ID of the chat room
ChatRoomConfigConfiguration for the chat room
Returns
A boolean indicating whether the process was started successfully

◆ ConfigureRoom() [2/2]

bool FOnlineChatAccelByte::ConfigureRoom ( const FUniqueNetId & UserId,
const FChatRoomId & RoomId,
const FChatRoomConfig & ChatRoomConfig )
overridevirtual

Update a room's configuration

Parameters
UserIdID of the user updating the chat room
RoomIdThe ID of the chat room
ChatRoomConfig#NOTE Unsupported
Returns
A boolean indicating whether the process was started successfully

◆ CreateRoom() [1/2]

bool FOnlineChatAccelByte::CreateRoom ( const FUniqueNetId & UserId,
const FChatRoomId & RoomId,
const FString & Nickname,
const FChatRoomConfig & ChatRoomConfig )
overridevirtual

Create a new chat room containing the given user. Deprecated.

Parameters
UserIdID of the user creating the chat room
RoomId#NOTE Unsupported field as the backend will generate an ID
NicknameThe local nickname of the chat room
ChatRoomConfig#NOTE Unsupported field as the backend does not support these configuration options
Returns
A boolean indicating whether the process was started successfully
Deprecated
Manual room creation is deprecated - please use V2 Sessions to auto-create chat rooms!

◆ CreateRoom() [2/2]

bool FOnlineChatAccelByte::CreateRoom ( const FUniqueNetId & UserId,
const FString & Nickname,
const FAccelByteChatRoomConfig & ChatRoomConfig )
virtual

Create a new chat room containing the given user. Deprecated.

Parameters
UserIdID of the user creating the chat room
NicknameThe local nickname of the chat room
ChatRoomConfigConfiguration for the chat room
Returns
A boolean indicating whether the process was started successfully
Deprecated
Manual room creation is deprecated - please use V2 Sessions to auto-create chat rooms!

◆ DEFINE_ONLINE_DELEGATE_FIVE_PARAM() [1/3]

FOnlineChatAccelByte::DEFINE_ONLINE_DELEGATE_FIVE_PARAM ( OnSendChatCompleteWithError ,
FString ,
FString ,
FString ,
bool ,
const FOnlineError &  )

Delegate fired when a sending a chat message is completed

◆ DEFINE_ONLINE_DELEGATE_FIVE_PARAM() [2/3]

FOnlineChatAccelByte::DEFINE_ONLINE_DELEGATE_FIVE_PARAM ( OnUserBanned ,
FString ,
EBanType ,
FString ,
EBanReason ,
bool  )

Delegate fired when a notification is received regarding being banned from chat

◆ DEFINE_ONLINE_DELEGATE_FIVE_PARAM() [3/3]

FOnlineChatAccelByte::DEFINE_ONLINE_DELEGATE_FIVE_PARAM ( OnUserUnbanned ,
FString ,
EBanType ,
FString ,
EBanReason ,
bool  )

Delegate fired when a notification is received regarding being un-banned from chat

◆ DEFINE_ONLINE_DELEGATE_FOUR_PARAM() [1/3]

FOnlineChatAccelByte::DEFINE_ONLINE_DELEGATE_FOUR_PARAM ( OnSendChatComplete ,
FString ,
FString ,
FString ,
bool  )

Delegate fired when a sending a chat message is completed

◆ DEFINE_ONLINE_DELEGATE_FOUR_PARAM() [2/3]

FOnlineChatAccelByte::DEFINE_ONLINE_DELEGATE_FOUR_PARAM ( OnTopicDeleted ,
FString ,
FString ,
FString ,
bool  )

Delegate fired when a notification is received regarding a topic being deleted

◆ DEFINE_ONLINE_DELEGATE_FOUR_PARAM() [3/3]

FOnlineChatAccelByte::DEFINE_ONLINE_DELEGATE_FOUR_PARAM ( OnTopicUpdated ,
FString ,
FString ,
FString ,
bool  )

Delegate fired when a notification is received regarding a topic being updated

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM() [1/2]

FOnlineChatAccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( OnChatDisconnected ,
FString  )

Delegate fired when a notification is received regarding disconnection from the chat service

◆ DEFINE_ONLINE_DELEGATE_ONE_PARAM() [2/2]

FOnlineChatAccelByte::DEFINE_ONLINE_DELEGATE_ONE_PARAM ( OnReadChatReceived ,
TArray< FAccelByteModelsChatReadChatData >  )

Delegate fired when a notification is received regarding a read chat

◆ DEFINE_ONLINE_DELEGATE_THREE_PARAM() [1/5]

FOnlineChatAccelByte::DEFINE_ONLINE_DELEGATE_THREE_PARAM ( OnGetSystemMessageStatsComplete ,
const FUniqueNetId & ,
const FAccelByteGetSystemMessageStatsResponse & ,
const FOnlineError &  )

Delegate fired when action to get system message stats completed.

◆ DEFINE_ONLINE_DELEGATE_THREE_PARAM() [2/5]

FOnlineChatAccelByte::DEFINE_ONLINE_DELEGATE_THREE_PARAM ( OnQuerySystemMessageComplete ,
const FUniqueNetId & ,
const TArray< FSystemMessageNotifMessage > & ,
const FOnlineError &  )

Delegate fired when a query for system message completed.

◆ DEFINE_ONLINE_DELEGATE_THREE_PARAM() [3/5]

FOnlineChatAccelByte::DEFINE_ONLINE_DELEGATE_THREE_PARAM ( OnQueryTransientSystemMessageComplete ,
const FUniqueNetId & ,
const TArray< FAccelByteModelsQuerySystemMessagesResponseItem > & ,
const FOnlineError &  )

Delegate fired when a query for transient system message completed.

◆ DEFINE_ONLINE_DELEGATE_THREE_PARAM() [4/5]

FOnlineChatAccelByte::DEFINE_ONLINE_DELEGATE_THREE_PARAM ( OnTopicAdded ,
FString ,
FString ,
FString  )

Delegate fired when a notification is received regarding being added to a topic

◆ DEFINE_ONLINE_DELEGATE_THREE_PARAM() [5/5]

FOnlineChatAccelByte::DEFINE_ONLINE_DELEGATE_THREE_PARAM ( OnTopicRemoved ,
FString ,
FString ,
FString  )

Delegate fired when a notification is received regarding being removed from a topic

◆ DEFINE_ONLINE_DELEGATE_TWO_PARAM() [1/4]

FOnlineChatAccelByte::DEFINE_ONLINE_DELEGATE_TWO_PARAM ( OnDeleteSystemMessagesComplete ,
const FUniqueNetId & ,
const FOnlineError &  )

Delegate fired when action to delete system messages completed.

◆ DEFINE_ONLINE_DELEGATE_TWO_PARAM() [2/4]

FOnlineChatAccelByte::DEFINE_ONLINE_DELEGATE_TWO_PARAM ( OnSystemMessageReceived ,
const FUniqueNetId & ,
const FSystemMessageNotifMessage &  )

Delegate fired when a system message received.

◆ DEFINE_ONLINE_DELEGATE_TWO_PARAM() [3/4]

FOnlineChatAccelByte::DEFINE_ONLINE_DELEGATE_TWO_PARAM ( OnTransientSystemMessageReceived ,
const FUniqueNetId & ,
const FAccelByteModelsChatSystemMessageNotif &  )

Delegate fired when a transient system message received.

◆ DEFINE_ONLINE_DELEGATE_TWO_PARAM() [4/4]

FOnlineChatAccelByte::DEFINE_ONLINE_DELEGATE_TWO_PARAM ( OnUpdateSystemMessagesComplete ,
const FUniqueNetId & ,
const FOnlineError &  )

Delegate fired when action to update system messages completed.

◆ DEFINE_ONLINE_PLAYER_DELEGATE_ONE_PARAM() [1/2]

FOnlineChatAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_ONE_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnChatMassiveOutageEvent ,
const AccelByte::FMassiveOutageInfo &  )

Called when the chat has been disconnected for longer than usual and can't be reconnected yet

◆ DEFINE_ONLINE_PLAYER_DELEGATE_ONE_PARAM() [2/2]

FOnlineChatAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_ONE_PARAM ( MAX_LOCAL_PLAYERS ,
AccelByteOnChatReconnectAttempted ,
const AccelByte::FReconnectAttemptInfo &  )

Called when the disconnected chat websocket trying to establish the connection again

◆ DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM() [1/2]

FOnlineChatAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM ( MAX_LOCAL_PLAYERS ,
OnChatConnectionClosed ,
int32 ,
const FString & ,
bool  )

Delegate fired when chat connection closed.

◆ DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM() [2/2]

FOnlineChatAccelByte::DEFINE_ONLINE_PLAYER_DELEGATE_THREE_PARAM ( MAX_LOCAL_PLAYERS ,
OnGetChatConfigComplete ,
bool ,
const FAccelByteModelsChatPublicConfigResponse & ,
const FString &  )

Delegate fired when action to get chat config completed.

◆ DeleteSystemMessages()

bool FOnlineChatAccelByte::DeleteSystemMessages ( const FUniqueNetId & UserId,
const TSet< FString > & MessageIds )

Delete system message(s) in user system inbox based on the message ids. Listen to OnDeleteSystemMessagesComplete delegate for the result after the action completed.

Parameters
UserIdid of user that perform this action
MessageIdslist of message ids to be deleted
Returns
if successfully started the async operation

◆ ExitRoom()

bool FOnlineChatAccelByte::ExitRoom ( const FUniqueNetId & UserId,
const FChatRoomId & RoomId )
overridevirtual

Exit a chat room

Parameters
UserIdID of the user exiting the chat room
RoomIdThe ID of the chat room
Returns
A boolean indicating whether the process was started successfully

◆ GetAccelByteChatRoomMember()

FAccelByteChatRoomMemberRef FOnlineChatAccelByte::GetAccelByteChatRoomMember ( const FString & UserId)

Get cached room member

◆ GetChatConfig() [1/2]

bool FOnlineChatAccelByte::GetChatConfig ( const FUniqueNetId & UserId)

Get chat configuration of the namespace Listen to OnGetChatConfigComplete delegate for the result after the action completed

Parameters
UserIdid of user that perform this action
Returns
if successfully started the async operation

◆ GetChatConfig() [2/2]

bool FOnlineChatAccelByte::GetChatConfig ( int32 LocalUserNum)

Get chat configuration of the namespace Listen to OnGetChatConfigComplete delegate for the result after the action completed

Parameters
LocalUserNumtarget local user num that perform this action
Returns
if successfully started the async operation

◆ GetChatRoomType()

EAccelByteChatRoomType FOnlineChatAccelByte::GetChatRoomType ( const FString & TopicId)
static

Determine chat room type based on topic Id

◆ GetFromSubsystem()

bool FOnlineChatAccelByte::GetFromSubsystem ( const IOnlineSubsystem * Subsystem,
TSharedPtr< FOnlineChatAccelByte, ESPMode::ThreadSafe > & OutInterfaceInstance )
static

Convenience method to get an instance of this interface from the subsystem passed in.

Parameters
SubsystemSubsystem instance that we wish to get this interface from
OutInterfaceInstanceInstance of the interface that we got from the subsystem, or nullptr if not found
Returns
boolean that is true if we could get an instance of the interface, false otherwise

◆ GetFromWorld()

bool FOnlineChatAccelByte::GetFromWorld ( const UWorld * World,
TSharedPtr< FOnlineChatAccelByte, ESPMode::ThreadSafe > & OutInterfaceInstance )
static

Convenience method to get an instance of this interface from the subsystem associated with the world passed in.

Parameters
WorldWorld instance that we wish to get the interface from
OutInterfaceInstanceInstance of the interface that we got from the subsystem, or nullptr if not found
Returns
boolean that is true if we could get an instance of the interface, false otherwise

◆ GetLastMessages()

bool FOnlineChatAccelByte::GetLastMessages ( const FUniqueNetId & UserId,
const FChatRoomId & RoomId,
int32 NumMessages,
TArray< TSharedRef< FChatMessage > > & OutMessages )
overridevirtual

Return only live messages

◆ GetMaxChatMessageLength()

int32 FOnlineChatAccelByte::GetMaxChatMessageLength ( ) const
inline

Get current maximum chat message length

◆ GetPersonalChatTopicId()

TOptional< FString > FOnlineChatAccelByte::GetPersonalChatTopicId ( const FString & FromUserId,
const FString & ToUserId )

Get user's personal chat topic to target user

Parameters
FromUserId
ToUserId
Returns
TOptional<FString> Value will be set if personal chat is found

◆ GetSystemMessageStats()

bool FOnlineChatAccelByte::GetSystemMessageStats ( const FUniqueNetId & UserId,
const FAccelByteGetSystemMessageStatsRequest & Request = {} )

Get system message(s) statistic in user system inbox. Currently the stats have oldest unread and unread count of system messages. Listen to OnGetSystemMessageStatsComplete delegate for the result after the action completed.

Parameters
UserIdid of user that perform this action
Requestoptional params for getting system message stats, currently it is still empty and can be ignored
Returns
if successfully started the async operation

◆ GetTopic()

FAccelByteChatRoomInfoPtr FOnlineChatAccelByte::GetTopic ( const FString & TopicId)

Get topic from cache

◆ GetUserConfiguration() [1/2]

bool FOnlineChatAccelByte::GetUserConfiguration ( const FUniqueNetId & UserId)

Get chat configuration for current user. Listen to OnGetUserChatConfigurationComplete delegate for the result after the action completed.

Parameters
UserIdid of user that perform this action.
Returns
if successfully started the async operation.

◆ GetUserConfiguration() [2/2]

bool FOnlineChatAccelByte::GetUserConfiguration ( const int32 LocalUserNum)

Get chat configuration for current user. Listen to OnGetUserChatConfigurationComplete delegate for the result after the action completed.

Parameters
LocalUserNumtarget local user num that perform this action.
Returns
if successfully started the async operation.

◆ HasPersonalChat()

bool FOnlineChatAccelByte::HasPersonalChat ( const FString & FromUserId,
const FString & ToUserId )

Check if user has personal chat topic to target user

◆ IsJoinedTopic()

bool FOnlineChatAccelByte::IsJoinedTopic ( const FString & UserId,
const FString & TopicId )

Check if user has joined topic Can be use to check if user joined session chat or party chat

◆ JoinPrivateRoom()

bool FOnlineChatAccelByte::JoinPrivateRoom ( const FUniqueNetId & UserId,
const FChatRoomId & RoomId,
const FString & Nickname,
const FChatRoomConfig & ChatRoomConfig )
overridevirtual

Join a private chat room - not supported!

◆ JoinPublicRoom()

bool FOnlineChatAccelByte::JoinPublicRoom ( const FUniqueNetId & UserId,
const FChatRoomId & RoomId,
const FString & Nickname,
const FChatRoomConfig & ChatRoomConfig )
overridevirtual

Join a chat room

Parameters
UserIdID of the user joining the chat room
RoomIdThe ID of the chat room
NicknameLocal nickname for the chat room
ChatRoomConfig#NOTE Unsupported
Returns
A boolean indicating whether the process was started successfully

◆ PartyV1IdToChatTopicId()

FString FOnlineChatAccelByte::PartyV1IdToChatTopicId ( const FString & PartyId)
static

Convert Lobby Party Id to Topic Id Note: Party chat only available when TextChat configuration is true

◆ PartyV2IdToChatTopicId()

FString FOnlineChatAccelByte::PartyV2IdToChatTopicId ( const FString & PartyId)
static

Convert Session Party Id to Topic Id Note: Party chat only available when TextChat configuration is true

◆ PersonalChatTopicId()

FString FOnlineChatAccelByte::PersonalChatTopicId ( const FString & FromUserId,
const FString & ToUserId )
static

[DEPRECATED] Unreliable method to obtain the topic ID and might be different from backend's sorting result. Convert User Id to personal Topic Id To be able to send personal chat, personal topic need to be created first

◆ QueryChatRoom()

bool FOnlineChatAccelByte::QueryChatRoom ( const FUniqueNetId & PlayerId,
const FAccelByteModelsChatQueryTopicRequest & Request,
const FOnChatQueryRoomComplete & OnComplete )

Manually query chat room This function spawn AsyncTask to query room and will call OnQueryComplete once finishes.

Parameters
PlayerId
Request
OnComplete
Returns
bool Will return true if the AsyncTask was successfully launched, false otherwise.

◆ QuerySystemMessage()

bool FOnlineChatAccelByte::QuerySystemMessage ( const FUniqueNetId & UserId,
const FQuerySystemMessageOptions & OptionalParams = {} )

Query system message(s) in user system inbox. Listen to OnQuerySystemMessageComplete delegate for the result after the action completed.

Parameters
UserIdid of user that perform this action
OptionalParamsoptional query params, if left empty it will query all of the system messages
Returns
if successfully started the async operation

◆ QueryTransientSystemMessage()

bool FOnlineChatAccelByte::QueryTransientSystemMessage ( const FUniqueNetId & UserId,
const FQuerySystemMessageOptions & OptionalParams = {} )

Query transient system message(s) in user system inbox. Listen to OnQueryTransientSystemMessageComplete delegate for the result after the action completed.

Parameters
UserIdid of user that perform this action
OptionalParamsoptional query params, if left empty it will query all of the system messages
Returns
if successfully started the async operation

◆ RemoveMemberFromTopic()

void FOnlineChatAccelByte::RemoveMemberFromTopic ( const FString & UserId,
const FString & TopicId )

Remove member to topic cache. Called on EventRemovedFromTopic

◆ RemoveTopic()

void FOnlineChatAccelByte::RemoveTopic ( const FString & TopicId)

Remove topicId from cache. Called on EventTopicDeleted

◆ ReportChatMessage()

bool FOnlineChatAccelByte::ReportChatMessage ( const FUniqueNetId & UserId,
const TSharedRef< FChatMessage > & Message,
const FString & Reason,
const FString & Comment,
FOnReportChatMessageComplete CompletionDelegate )

Report a chat message for abuse.

Parameters
UserIdID of the user that is reporting the given chat message
MessageShared reference to the chat message to report
ReasonString describing the reason for reporting the chat message
CommentString giving more detail on the report
CompletionDelegateDelegate run on completion of report task to inform success state
Returns
boolean that is true if async operation started, false otherwise

◆ SendPrivateChat()

bool FOnlineChatAccelByte::SendPrivateChat ( const FUniqueNetId & UserId,
const FUniqueNetId & RecipientId,
const FString & MsgBody )
overridevirtual

Kick off request for sending a chat message privately between users

Parameters
UserIdid of user that is sending the message
RecipientIdid of user to send the chat to
MsgBodyplain text of message body
Returns
if successfully started the async operation

◆ SendRoomChat()

bool FOnlineChatAccelByte::SendRoomChat ( const FUniqueNetId & UserId,
const FChatRoomId & RoomId,
const FString & MsgBody )
overridevirtual

Send a chat message to a room

Parameters
UserIdID of the user sending the message
RoomIdThe ID of the chat room
MsgBodyThe message to send
Returns
A boolean indicating whether the process was started successfully

◆ SessionV2IdToChatTopicId()

FString FOnlineChatAccelByte::SessionV2IdToChatTopicId ( const FString & SessionId)
static

Convert Game Session Id to TopicId Note: Session chat only available when TextChat configuration is true

◆ SetMaxChatMessageLength()

void FOnlineChatAccelByte::SetMaxChatMessageLength ( int32 InMaxChatMessageLength)
inline

Cache current maximum chat message length

◆ SetUserConfiguration() [1/2]

bool FOnlineChatAccelByte::SetUserConfiguration ( const FUniqueNetId & UserId,
const FAccelByteModelsSetUserChatConfigurationRequest & Configuration )

Set chat configuration for current user Listen to OnSetUserChatConfigurationComplete delegate for the result after the action completed

Parameters
UserIdid of user that perform this action
Configurationuser chat configuration.
Returns
if successfully started the async operation

◆ SetUserConfiguration() [2/2]

bool FOnlineChatAccelByte::SetUserConfiguration ( const int32 LocalUserNum,
const FAccelByteModelsSetUserChatConfigurationRequest & Configuration )

Set chat configuration for current user. Listen to OnSetUserChatConfigurationComplete delegate for the result after the action completed.

Parameters
LocalUserNumtarget local user num that perform this action.
Configurationuser chat configuration.
Returns
if successfully started the async operation

◆ UpdateSystemMessages()

bool FOnlineChatAccelByte::UpdateSystemMessages ( const FUniqueNetId & UserId,
const TArray< FAccelByteModelsActionUpdateSystemMessage > & ActionUpdateSystemMessages )

Update system message(s) in user system inbox. This can be used for marking message as keep or as read. Listen to OnUpdateSystemMessagesComplete delegate for the result after the action completed.

Parameters
UserIdid of user that perform this action
ActionUpdateSystemMessageslist of the action will be performed to the system message
Returns
if successfully started the async operation

Member Data Documentation

◆ __pad0__

PACKAGE_SCOPE FOnlineChatAccelByte::__pad0__

Delegate fired when action to get user chat configuration completed. Delegate fired when action to set user chat configuration completed.