1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2024-11-25 10:42:17 -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) { client.getRoster(function (err, resp) {
resp = resp.toJSON(); resp = resp.toJSON();
var resultVer = resp.roster.ver; if (resp.roster && resp.roster.items && resp.roster.items.length) {
if (me.rosterVer && resultVer && me.rosterVer !== resultVer) {
app.storage.roster.clear(function () { app.storage.roster.clear(function () {
me.contacts.reset(); me.contacts.reset();
me.rosterVer = resp.roster.ver; me.rosterVer = resp.roster.ver;

View File

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