- Copyright:
- The Converse.js contributors
- License:
- Mozilla Public License (MPLv2)
- Source:
Namespaces
Methods
(private, inner) addResource(presence:)
Adds a new resource and it's associated attributes as taken from the passed in presence stanza. Also updates the presence if the resource has higher priority (and is newer).
Parameters:
Name | Type | Description |
---|---|---|
presence: |
Element | The presence stanza |
(inner) fetchFromServer() → {promise}
Fetch the roster from the XMPP server
Fires:
Returns:
- Type
- promise
(inner) fetchRosterContacts() → {promise}
Fetches the roster contacts, first by trying the browser cache, and if that's empty, then by querying the XMPP server.
Returns:
Promise which resolves once the contacts have been fetched.
- Type
- promise
(inner) getFilterCriteria() → {String}
Return a string of tab-separated values that are to be used when matching against filter text.
The goal is to be able to filter against the VCard fullname, roster nickname and JID.
Returns:
Lower-cased, tab-separated values
- Type
- String
(private, inner) getHighestPriorityResource()
Return the resource with the highest priority. If multiple resources have the same priority, take the latest one.
(inner) rejectPresenceSubscription(jid, message)
Reject or cancel another user's subscription to our presence updates.
Parameters:
Name | Type | Description |
---|---|---|
jid |
String | The Jabber ID of the user whose subscription is being canceled |
message |
String | An optional message to the user |
(private, inner) removeResource(name:)
Remove the passed in resource from the resources map. Also redetermines the presence given that there's one less resource.
Parameters:
Name | Type | Description |
---|---|---|
name: |
string | The resource name |
(inner) sendCSI(stat)
Send out a Client State Indication (XEP-0352)
Parameters:
Name | Type | Description |
---|---|---|
stat |
String | The user's chat status |
(inner) updateContact(item)
Update or create RosterContact models based on the given item
XML
node received in the resulting IQ stanza from the server.
Parameters:
Name | Type | Description |
---|---|---|
item |
Element |