|
@@ -899,7 +899,6 @@
|
|
* (String) message - An optional message to explain the
|
|
* (String) message - An optional message to explain the
|
|
* reason for the subscription request.
|
|
* reason for the subscription request.
|
|
*/
|
|
*/
|
|
- this.save('ask', "subscribe"); // ask === 'subscribe' Means we have ask to subscribe to them.
|
|
|
|
const pres = $pres({to: this.get('jid'), type: "subscribe"});
|
|
const pres = $pres({to: this.get('jid'), type: "subscribe"});
|
|
if (message && message !== "") {
|
|
if (message && message !== "") {
|
|
pres.c("status").t(message).up();
|
|
pres.c("status").t(message).up();
|
|
@@ -909,6 +908,7 @@
|
|
pres.c('nick', {'xmlns': Strophe.NS.NICK}).t(nick).up();
|
|
pres.c('nick', {'xmlns': Strophe.NS.NICK}).t(nick).up();
|
|
}
|
|
}
|
|
_converse.connection.send(pres);
|
|
_converse.connection.send(pres);
|
|
|
|
+ this.save('ask', "subscribe"); // ask === 'subscribe' Means we have asked to subscribe to them.
|
|
return this;
|
|
return this;
|
|
},
|
|
},
|
|
|
|
|
|
@@ -1311,11 +1311,11 @@
|
|
return; // We're lazy when adding contacts.
|
|
return; // We're lazy when adding contacts.
|
|
}
|
|
}
|
|
this.create({
|
|
this.create({
|
|
- ask,
|
|
|
|
- fullname: item.getAttribute("name") || jid,
|
|
|
|
- groups,
|
|
|
|
- jid,
|
|
|
|
- subscription
|
|
|
|
|
|
+ 'ask': ask,
|
|
|
|
+ 'fullname': item.getAttribute("name") || jid,
|
|
|
|
+ 'groups': groups,
|
|
|
|
+ 'jid': jid,
|
|
|
|
+ 'subscription': subscription
|
|
}, {sort: false});
|
|
}, {sort: false});
|
|
} else {
|
|
} else {
|
|
if (subscription === "remove") {
|
|
if (subscription === "remove") {
|
|
@@ -1326,10 +1326,10 @@
|
|
// here, we know they aren't requesting anymore.
|
|
// here, we know they aren't requesting anymore.
|
|
// see docs/DEVELOPER.rst
|
|
// see docs/DEVELOPER.rst
|
|
contact.save({
|
|
contact.save({
|
|
- subscription,
|
|
|
|
- ask,
|
|
|
|
- requesting: null,
|
|
|
|
- groups
|
|
|
|
|
|
+ 'subscription': subscription,
|
|
|
|
+ 'ask': ask,
|
|
|
|
+ 'requesting': null,
|
|
|
|
+ 'groups': groups
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|