1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2024-11-05 17:15:04 -05:00

Refresh roster cache correctly (anytime there's a roster result with items).

This commit is contained in:
Lance Stout 2014-01-27 15:12:46 -08:00
parent 6f1a7b7056
commit 9dc5757e9b
2 changed files with 2 additions and 3 deletions

View File

@ -114,8 +114,7 @@ module.exports = function (client, app) {
client.getRoster(function (err, resp) {
resp = resp.toJSON();
var resultVer = resp.roster.ver;
if (me.rosterVer && resultVer && me.rosterVer !== resultVer) {
if (resp.roster && resp.roster.items && resp.roster.items.length) {
app.storage.roster.clear(function () {
me.contacts.reset();
me.rosterVer = resp.roster.ver;

View File

@ -1,6 +1,6 @@
{
"name": "otalk.im",
"version": "0.0.23",
"version": "0.0.24",
"description": "Otalk: WebRTC Enabled XMPP Client, in the Browser",
"repository": {
"type": "git",