Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #79 from hperrin/patch-4

Fixed problem where a subscription type presence stanza caused roster pl...
  • Loading branch information...
commit 3d086fc912518dbeecc3140fed5cd1dbadffdff7 2 parents 201744c + bafac94
@flosse flosse authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 roster/strophe.roster.js
View
9 roster/strophe.roster.js
@@ -261,7 +261,7 @@ Strophe.addConnectionPlugin('roster',
{
delete item.resources[Strophe.getResourceFromJid(jid)];
}
- else
+ else if (!type)
{
// TODO: add timestamp
item.resources[Strophe.getResourceFromJid(jid)] = {
@@ -270,6 +270,11 @@ Strophe.addConnectionPlugin('roster',
priority : (presence.getElementsByTagName('priority').length != 0) ? Strophe.getText(presence.getElementsByTagName('priority')[0]) : ""
};
}
+ else
+ {
+ // Stanza is not a presence notification. (It's probably a subscription type stanza.)
+ return true;
+ }
this._call_backs(this.items, item);
return true;
},
@@ -348,7 +353,7 @@ Strophe.addConnectionPlugin('roster',
item.name = name;
item.subscription = subscription;
item.ask = ask;
- item.group = groups;
+ item.groups = groups;
}
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.