- Source:
Methods
(private) ackSubscribe()
Upon receiving the presence stanza of type "subscribed", the user SHOULD acknowledge receipt of that subscription state notification by sending a presence stanza of type "subscribe" to the contact
- Source:
(private) ackUnsubscribe(jid)
Upon receiving the presence stanza of type "unsubscribed", the user SHOULD acknowledge receipt of that subscription state notification by sending a presence stanza of type "unsubscribe" this step lets the user's server know that it MUST no longer send notification of the subscription state change to the user.
Parameters:
Name | Type | Description |
---|---|---|
jid |
String | The Jabber ID of the user who is unsubscribing |
- Source:
(private) addAndSubscribe(jid, name, groups, message, attributes)
Add a roster contact and then once we have confirmation from the XMPP server we subscribe to that contact's presence updates.
Parameters:
Name | Type | Description |
---|---|---|
jid |
String | The Jabber ID of the user being added and subscribed to. |
name |
String | The name of that user |
groups |
Array.String | Any roster groups the user might belong to |
message |
String | An optional message to explain the reason for the subscription request. |
attributes |
Object | Any additional attributes to be stored on the user's model. |
- Source:
(private) addContactToRoster(jid, name, groups, attributes)
Adds a RosterContact instance to _converse.roster and registers the contact on the XMPP server. Returns a promise which is resolved once the XMPP server has responded.
Parameters:
Name | Type | Description |
---|---|---|
jid |
String | The Jabber ID of the user being added and subscribed to. |
name |
String | The name of that user |
groups |
Array.String | Any roster groups the user might belong to |
attributes |
Object | Any additional attributes to be stored on the user's model. |
- Source:
(private) authorize(message)
Authorize presence subscription
Parameters:
Name | Type | Description |
---|---|---|
message |
String | Optional message to send to the person being authorized |
- Source:
(private) onRosterPush(IQ)
Handle roster updates from the XMPP server. See: https://xmpp.org/rfcs/rfc6121.html#roster-syntax-actions-push
Parameters:
Name | Type | Description |
---|---|---|
IQ |
XMLElement | The IQ stanza received from the XMPP server. |
- Source:
(private) sendContactAddIQ(jid, name, groups, callback, errback)
Send an IQ stanza to the XMPP server to add a new roster contact.
Parameters:
Name | Type | Description |
---|---|---|
jid |
String | The Jabber ID of the user being added |
name |
String | The name of that user |
groups |
Array.String | Any roster groups the user might belong to |
callback |
function | A function to call once the IQ is returned |
errback |
function | A function to call if an error occurred |
- Source:
(private) subscribe(message)
Send a presence subscription request to this roster contact
Parameters:
Name | Type | Description |
---|---|---|
message |
String | An optional message to explain the reason for the subscription request. |
- Source:
(private) unauthorize(message)
Unauthorize this contact's presence subscription
Parameters:
Name | Type | Description |
---|---|---|
message |
String | Optional message to send to the person being unauthorized |
- Source: