Roster/subscription bugfix.

This commit is contained in:
JC Brand 2012-09-11 21:26:59 +02:00
parent aebd3b5beb
commit 5a56fcc6a4

View File

@ -1167,7 +1167,8 @@ xmppchat.Roster = (function (_, $, console) {
(presence_type === 'unsubscribe')) {
return true;
} else if (presence_type === 'subscribe') {
if (ob.getItem(bare_jid)) {
item = ob.getItem(bare_jid);
if ((item) && (item.get('subscription') != 'none')) {
xmppchat.connection.roster.authorize(bare_jid);
} else {
ob.addRosterItem(bare_jid, 'none', 'request');