freedom-social-xmpp
Advanced tools
Comparing version 0.0.3 to 0.0.6
@@ -174,2 +174,6 @@ /*globals freedom:true,setTimeout,console,VCardStore */ | ||
XMPPSocialProvider.prototype.getUsers = function(continuation) { | ||
continuation(this.vCardStore.getUsers()); | ||
}; | ||
/** | ||
@@ -176,0 +180,0 @@ * Sends a message to a user on the network. |
@@ -77,9 +77,9 @@ /*globals freedom:true,setTimeout,window */ | ||
VCardStore.prototype.getUsers = function() { | ||
var user, cards = {}; | ||
for (user in this.cards) { | ||
if (this.cards.hasOwnProperty(user)) { | ||
cards[user] = this.getUser(user); | ||
var allUsers = {}, userId; | ||
for (userId in this.users) { | ||
if (this.users.hasOwnProperty(userId)) { | ||
allUsers[userId] = this.getUser(userId); | ||
} | ||
} | ||
return cards; | ||
return allUsers; | ||
}; | ||
@@ -92,3 +92,3 @@ | ||
changed = false; | ||
if (message.attr.xmlns !== 'vcard-temp' || | ||
if (message.attr('xmlns') !== 'vcard-temp' || | ||
!this.storage) { | ||
@@ -130,4 +130,6 @@ return; | ||
} | ||
if (changed) { | ||
user.timestamp = Date.now(); | ||
this.users[userid] = user; | ||
this.onUserChange(user); | ||
@@ -134,0 +136,0 @@ } |
@@ -14,2 +14,3 @@ { | ||
"identity", | ||
"storage", | ||
"https://www.googleapis.com/*" | ||
@@ -16,0 +17,0 @@ ], |
@@ -174,2 +174,6 @@ /*globals freedom:true,setTimeout,console,VCardStore */ | ||
XMPPSocialProvider.prototype.getUsers = function(continuation) { | ||
continuation(this.vCardStore.getUsers()); | ||
}; | ||
/** | ||
@@ -176,0 +180,0 @@ * Sends a message to a user on the network. |
@@ -77,9 +77,9 @@ /*globals freedom:true,setTimeout,window */ | ||
VCardStore.prototype.getUsers = function() { | ||
var user, cards = {}; | ||
for (user in this.cards) { | ||
if (this.cards.hasOwnProperty(user)) { | ||
cards[user] = this.getUser(user); | ||
var allUsers = {}, userId; | ||
for (userId in this.users) { | ||
if (this.users.hasOwnProperty(userId)) { | ||
allUsers[userId] = this.getUser(userId); | ||
} | ||
} | ||
return cards; | ||
return allUsers; | ||
}; | ||
@@ -92,3 +92,3 @@ | ||
changed = false; | ||
if (message.attr.xmlns !== 'vcard-temp' || | ||
if (message.attr('xmlns') !== 'vcard-temp' || | ||
!this.storage) { | ||
@@ -130,4 +130,6 @@ return; | ||
} | ||
if (changed) { | ||
user.timestamp = Date.now(); | ||
this.users[userid] = user; | ||
this.onUserChange(user); | ||
@@ -134,0 +136,0 @@ } |
{ | ||
"name": "freedom-social-xmpp", | ||
"description": "XMPP Social provider for freedomjs", | ||
"version": "0.0.3", | ||
"version": "0.0.6", | ||
"homepage": "http://freedomjs.org", | ||
@@ -6,0 +6,0 @@ "bugs": { |
@@ -174,2 +174,6 @@ /*globals freedom:true,setTimeout,console,VCardStore */ | ||
XMPPSocialProvider.prototype.getUsers = function(continuation) { | ||
continuation(this.vCardStore.getUsers()); | ||
}; | ||
/** | ||
@@ -176,0 +180,0 @@ * Sends a message to a user on the network. |
@@ -77,9 +77,9 @@ /*globals freedom:true,setTimeout,window */ | ||
VCardStore.prototype.getUsers = function() { | ||
var user, cards = {}; | ||
for (user in this.cards) { | ||
if (this.cards.hasOwnProperty(user)) { | ||
cards[user] = this.getUser(user); | ||
var allUsers = {}, userId; | ||
for (userId in this.users) { | ||
if (this.users.hasOwnProperty(userId)) { | ||
allUsers[userId] = this.getUser(userId); | ||
} | ||
} | ||
return cards; | ||
return allUsers; | ||
}; | ||
@@ -92,3 +92,3 @@ | ||
changed = false; | ||
if (message.attr.xmlns !== 'vcard-temp' || | ||
if (message.attr('xmlns') !== 'vcard-temp' || | ||
!this.storage) { | ||
@@ -130,4 +130,6 @@ return; | ||
} | ||
if (changed) { | ||
user.timestamp = Date.now(); | ||
this.users[userid] = user; | ||
this.onUserChange(user); | ||
@@ -134,0 +136,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
933642
28242
18