SetAppearOfflineAsync
method in Coherence.Cloud.FriendsService
Methods
public FriendsOperation SetAppearOfflineAsync(bool appearOffline, CancellationToken cancellationToken = default)
Hides the player from their friends, without logging them out.
Parameters
| Type | Name | Description |
|---|---|---|
| bool | appearOffline | |
| CancellationToken | cancellationToken | Cancels the request. |
Returns
| Type | Description |
|---|---|
| FriendsOperation |
Remarks
Unlike presence, this state is kept on the player rather than on the connection: it survives a disconnect, a reconnect and a logout, and stays applied until it's set back to false.
While hidden, friends will see the player offline, with no presence and no lobbies. Hiding does
not clear the presence though: it stays on the connection out of sight, and friends see it again as
soon as appearOffline is set back to false, without the
game sending it a second time.
Shares the rate limit of SetPresenceAsync(string, CancellationToken).
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException | This service has been disposed. Thrown at the call site rather than reported through the returned request. |