|
@@ -268,7 +268,7 @@ converse.plugins.add('converse-roster', {
|
|
|
if (nick) {
|
|
|
pres.c('nick', {'xmlns': Strophe.NS.NICK}).t(nick).up();
|
|
|
}
|
|
|
- _converse.connection.send(pres);
|
|
|
+ _converse.api.send(pres);
|
|
|
this.save('ask', "subscribe"); // ask === 'subscribe' Means we have asked to subscribe to them.
|
|
|
return this;
|
|
|
},
|
|
@@ -279,7 +279,7 @@ converse.plugins.add('converse-roster', {
|
|
|
* state notification by sending a presence stanza of type
|
|
|
* "subscribe" to the contact
|
|
|
*/
|
|
|
- _converse.connection.send($pres({
|
|
|
+ _converse.api.send($pres({
|
|
|
'type': 'subscribe',
|
|
|
'to': this.get('jid')
|
|
|
}));
|
|
@@ -294,7 +294,7 @@ converse.plugins.add('converse-roster', {
|
|
|
* Parameters:
|
|
|
* (String) jid - The Jabber ID of the user who is unsubscribing
|
|
|
*/
|
|
|
- _converse.connection.send($pres({'type': 'unsubscribe', 'to': this.get('jid')}));
|
|
|
+ _converse.api.send($pres({'type': 'unsubscribe', 'to': this.get('jid')}));
|
|
|
this.removeFromRoster();
|
|
|
this.destroy();
|
|
|
},
|
|
@@ -317,7 +317,7 @@ converse.plugins.add('converse-roster', {
|
|
|
if (message && message !== "") {
|
|
|
pres.c("status").t(message);
|
|
|
}
|
|
|
- _converse.connection.send(pres);
|
|
|
+ _converse.api.send(pres);
|
|
|
return this;
|
|
|
},
|
|
|
|
|
@@ -546,7 +546,7 @@ converse.plugins.add('converse-roster', {
|
|
|
// user's bare JID <user@domainpart>.
|
|
|
return;
|
|
|
}
|
|
|
- _converse.connection.send($iq({type: 'result', id, from: _converse.connection.jid}));
|
|
|
+ _converse.api.send($iq({type: 'result', id, from: _converse.connection.jid}));
|
|
|
|
|
|
const query = sizzle(`query[xmlns="${Strophe.NS.ROSTER}"]`, iq).pop();
|
|
|
this.data.save('version', query.getAttribute('ver'));
|