Namespace: Constants

Photon.Chat. Constants

Photon Chat API Constants
  • Photon-Javascript_v4-0-0-7_Cloud_SDK.js, line 4054


<static, readonly> UserStatus

Contains commonly used status values for Photon.Chat.ChatClient#setUserStatus.You can define your own.
While "online"(Online and up), the status message will be sent to anyone who has you on his friend list.
Define custom online status values as you like with these rules:
0: Means "offline".It will be used when you are not connected. In this status, there is no status message.
1: Means "invisible" and is sent to friends as "offline". They see status 0, no message but you can chat.
2: And any higher value will be treated as "online". Status can be set.

Name Type Description
Offline number Offline.
Invisible number Offline. Be invisible to everyone. Sends no message.
Online number Online and available.
Away number Online but not available.
Dnd number Do not disturb.
Lfg number Looking For Game / Group. Could be used when you want to be invited or do matchmaking.
Playing number Could be used when in a room, playing.
  • Photon-Javascript_v4-0-0-7_Cloud_SDK.js, line 4101


<static> UserStatusToName(status) → {string}

Converts Photon.Chat.Constants.UserStatus element to string name.

Name Type Description
status Photon.Chat.Constants.UserStatus User status enum element.
  • Photon-Javascript_v4-0-0-7_Cloud_SDK.js, line 4127
Specified element name or undefined if not found.