new Presence()
Represents a Presence of a User.
Use WTAPI.Presence.Builder to create a new presence.
Classes
Methods
getConnectedCall() → {WTAPI.ConnectedCall|null}
Returns call information in presence status of user, or null if there is no active call.
Returns:
- Type
- WTAPI.ConnectedCall | null
getLocation() → {WTAPI.Location|null}
Returns location of user, or null if user doesn't set it.
Returns:
- Type
- WTAPI.Location | null
getProfileData() → {WTAPI.ProfileData|null}
Returns profile data of user, or null if user doesn't set it.
Returns:
- Type
- WTAPI.ProfileData | null
getStatusIcon() → {String}
Returns a status icon representing a current status.
Possible values:
away
away-offline
dnd
dnd-offline
mur
mur-offline
online
offline
Returns:
- Type
- String
getStatusMessage() → {String|null}
Returns the status message of the presence, or null if user doesn't set it.
Returns:
- Type
- String | null
getStatusUntil() → {Date|null}
Returns the expire date of the presence, or null if user doesn't set it.
Expire date - a date when this presence are valid.
Returns:
- Type
- Date | null
isAway() → {boolean}
Returns true if user set away status.
Returns:
- Type
- boolean
isConnectedCallAvailable() → {boolean}
Returns true if user talking on the phone.
Returns:
- Type
- boolean
isDND() → {boolean}
Returns true if user set DND status.
Returns:
- Type
- boolean
isEmpty() → {boolean}
Returns true if user is offline and has default values for other properties.
Returns:
- Type
- boolean
isLocationAvailable() → {boolean}
Returns true if user set his location.
Returns:
- Type
- boolean
isMUR() → {boolean}
Returns true if user set MUR status.
Returns:
- Type
- boolean
isOnline() → {boolean}
Returns true if user is online (available) and false if the user is offline (unavailable).
Returns:
- Type
- boolean
isRegisteredDevice() → {boolean}
Returns true if user has a registered device.
Returns:
- Type
- boolean
isRinging() → {boolean}
Returns true if somebody is calling to user.
Returns:
- Type
- boolean
isStatusMessageAvailable() → {boolean}
Returns true if user set custom status message.
Returns:
- Type
- boolean
isStatusUntilAvailable() → {boolean}
Returns true if user set expire date for presence.
Returns:
- Type
- boolean
isTalking() → {boolean}
Returns true if user is talking with somebody.
Returns:
- Type
- boolean
isTalkingAndRinging() → {boolean}
Returns true if user is talking and somebody tries to call him.
Returns:
- Type
- boolean