Class: RosterPlugin

WTAPI.RosterPlugin()

new RosterPlugin()

Constructor for Roster plugin. Instance will be created each time when new WTAPI instance is created.
Plugin could be accessible thought WTAPI with roster property.
Source:
Tutorials:

Extends

  • WTAPI.Observer

Methods

createUser(jid, name) → {WTAPI.User}

Parameters:
Name Type Description
jid String
name String
Source:
Returns:
Type
WTAPI.User

createUserByExtension(extension) → {WTAPI.User}

Parameters:
Name Type Description
extension String
Source:
Returns:
Type
WTAPI.User

getRoster(callback)

Retrieves a list of user roster (a list of subscribed colleagues).
Parameters:
Name Type Description
callback function
Source:

getUser(jid) → {WTAPI.User|null}

Returns a User for specified jid, or null if user was not created previously.
Parameters:
Name Type Description
jid String
Source:
Returns:
Type
WTAPI.User | null

getUserByExtension(extension) → {WTAPI.User|null}

Returns a User for specified extension, or null if user was not created previously.
Parameters:
Name Type Description
extension String
Source:
Returns:
Type
WTAPI.User | null