When sending a direct text message, you might receive a VxErrorUserOffLineOrDoesNotExist
(5047)
error. The causes for this error are listed in the following sections.
User offline
This can happen if your messaging UI only allows the sender to select known recipients. If you receive this error and you are sure the recipient is valid, you should inform the sender that the user is unable to receive messages at this time.
Note: Vivox does not queue or store messages for offline users to receive when they next sign in.
User invalid
This can happen if your messaging UI allows the sender to input any value for the recipient. In this scenario, it is up to the implementer to determine if the recipient exists and then display the proper error message to the user.
Presence setting
There are various ways that the scenario where the recipient's presence shows as offline to the sender could occur.
- During the sign in process,
enable_buddies_and_presence
is set to 0. This disables presence for the user and they are always seen as offline. For more information, see the Unity and Unreal-specific login information in the following section. - During the sign in process,
buddy_managment_mode
is set tovx_buddy_management_mode::mode_block
. This automatically blocks any incoming presence subscription requests. - During the sign in process, the sender is part of the recipient's block list,
initial_blocked_uris
. - When using
vx_req_account_create_block_rule_t
, the recipient blocks the sender. - When using
vx_req_account_set_presence
, the user sets their presence value tovx_buddy_presence_state::buddy_presence_offline
.
Note: The functions and enums in the preceding list are for the Vivox Core SDK, but the general concept extends to the Vivox Unity SDK and Vivox Unreal SDK.
Unity
Using BeginLogin(Uri server, string accessToken,
AsyncCallback callback)
to sign in with Unity disables presence. For presence to be enabled, you must use the longer BeginLogin
function that contains the SubscriptionMode
parameter.
Unreal
Using BeginLogin(const FString &server, const FString
&accessToken, FOnBeginLoginCompletedDelegate theDelegate)
to sign in with Unreal disables presence. For presence to be enabled, you must use the longer BeginLogin
function that contains the SubscriptionMode
parameter.