Members
(readonly) displayName :string
Nickname of the Buddy, or their User name if nickname is not set.
This property can be useful to display the name of the User as a Buddy, giving priority to their nickname if set.
Type:
- string
(readonly) id :number
Identifier of the Buddy.
This is equal to the id assigned by SmartFoxServer to the corresponding User.
Type:
- number
- See
(readonly) isBlocked :boolean
Indicates whether the Buddy is blocked in the Buddy List of the current User.
Type:
- boolean
(readonly) isOnline :boolean
Indicates whether the Buddy is online in the Buddy List System.
Type:
- boolean
(readonly) isTemp :boolean
Indicates whether the Buddy is temporary (non-persistent) in the Buddy List of the current User.
Type:
- boolean
(readonly) name :string
Name of the Buddy.
This is equal to the name of the corresponding User.
Type:
- string
- See
(readonly) nickname :string
Nickname of the Buddy.
The value is null if the nickname is not set.
Type:
- string
(readonly) state :string
Current custom state of the Buddy.
Examples of custom states are Available, Busy, Be right back, etc. If the custom state is not set, null is returned.
The list of available custom states is returned by the SFSBuddyManager#buddyStates property. The value is null if the state is not set.
Type:
- string
Methods
containsVariable(varName) → {boolean}
Indicates whether the Buddy has the specified Buddy Variable set.
Parameters:
| Name | Type | Description |
|---|---|---|
varName | string | The name of the Buddy Variable whose existance must be checked. |
Returns:
true if a Buddy Variable with the passed name is found.- Type:
- boolean
getOfflineVariables() → {Array.<SFSBuddyVariable>}
Returns the list of persistent Buddy Variables belonging to the Buddy.
Returns:
A list of objects representing the offline Buddy Variables.
- Type:
- Array.<SFSBuddyVariable>
getOnlineVariables() → {Array.<SFSBuddyVariable>}
Returns the list of non-persistent Buddy Variables belonging to the Buddy.
Returns:
A list of objects representing the online Buddy Variables.
- Type:
- Array.<SFSBuddyVariable>
getVariable(varName) → {SFSBuddyVariable}
Retrieves a Buddy Variable by its name.
Parameters:
| Name | Type | Description |
|---|---|---|
varName | string | The name of the Buddy Variable to be retrieved. |
Returns:
The object representing the Buddy Variable, or
null if no Buddy Variable with the passed name belongs to the Buddy.- Type:
- SFSBuddyVariable
getVariables() → {Array.<SFSBuddyVariable>}
Returns all Buddy Variables belonging to the Buddy.
Returns:
A list of objects representing the Buddy Variables.
- Type:
- Array.<SFSBuddyVariable>
toString() → {string}
Returns a string containing the Buddy name and id.
Returns:
The string representation of the SFSBuddy object.
- Type:
- string