Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

freedom-social-xmpp

Package Overview
Dependencies
Maintainers
6
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

freedom-social-xmpp - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

.travis.yml

11

build/socialprovider.js

@@ -1,2 +0,2 @@

/*globals freedom:true,setTimeout,console,VCardStore */
/*globals freedom:true,setTimeout,console,VCardStore,global */
/*jslint indent:2,white:true,sloppy:true */

@@ -9,4 +9,9 @@

var window = {};
// Global declarations for node.js
if (typeof window === 'undefined') {
global.window = {};
global.XMLHttpRequest = {};
}
/**

@@ -199,3 +204,3 @@ * The SocialProvider implements the freedom.js social API

// will be broadcast to all clients.
var messageType = (this.vCardStore.getClient(to).status == 'ONLINE') ?
var messageType = (this.vCardStore.getClient(to).status === 'ONLINE') ?
'normal' : 'chat';

@@ -202,0 +207,0 @@

@@ -1,5 +0,5 @@

/*globals freedom:true,setTimeout,window */
/*globals freedom:true,setTimeout,window,VCardStore:true */
/*jslint indent:2,white:true,sloppy:true */
var VCardStore = function () {
VCardStore = function () {
if (freedom && freedom['core.storage']) {

@@ -6,0 +6,0 @@ this.storage = freedom['core.storage']();

@@ -29,3 +29,3 @@ var FILES = {},

alias : ['browser-request:request', 'lib/dns.js:dns', 'lib/net.js:net', 'lib/stringprep.js:node-stringprep'],
ignore : ['faye-websocket', 'tls']
ignore : ['faye-websocket', 'tls', './websockets']
}

@@ -103,3 +103,7 @@ }

]);
grunt.registerTask('travis', [
'compile',
'jasmine_node'
]);
grunt.registerTask('default', ['compile']);
};
{
"name": "freedom-social-xmpp",
"description": "XMPP Social provider for freedomjs",
"version": "0.0.11",
"version": "0.0.12",
"homepage": "http://freedomjs.org",

@@ -18,2 +18,5 @@ "bugs": {

},
"scripts": {
"test": "grunt travis"
},
"devDependencies": {

@@ -25,11 +28,11 @@ "node-xmpp-client": "~0.4.0",

"grunt-contrib-copy": "~0.5.0",
"freedom-for-chrome": "~0.1.6",
"freedom-for-chrome": "~0.1.7",
"grunt-contrib-jasmine": "^0.6.1",
"es5-shim": "^2.3.0",
"freedom-for-node": "~0.0.6",
"freedom-for-node": "~0.0.8",
"grunt-jasmine-node": "~0.2.1"
},
"peerDependencies": {
"freedom": "^0.4.6"
"freedom": "~0.4.12"
}
}

@@ -5,5 +5,5 @@ var social = freedom.socialprovider();

if (tag == 'relay') {
social.on(tag, function(tag, resp) {
social.on(msg, function(tag, resp) {
freedom.emit(tag, resp);
}.bind({}, tag));
}.bind({}, msg));
} else {

@@ -10,0 +10,0 @@ social[tag].apply(social, msg).then(function(tag, resp) {

@@ -0,12 +1,45 @@

var credentials = [];
var CredentializingView = function(caller, dispatch) {
this.dispatchEvent = dispatch;
};
CredentializingView.prototype.open = function(view, opts, continuation) {
continuation();
};
CredentializingView.prototype.show = function(continuation) {
continuation();
if (credentials.length) {
this.dispatchEvent('message', credentials.pop());
}
};
CredentializingView.prototype.close = function(continuation) {
continuation();
};
describe('Login integration', function() {
var freedom;
var freedom, acct;
beforeEach(function() {
freedom = require('freedom-for-node').freedom;
expect(freedom).toBeDefined();
fdom.apis.register('core.view', CredentializingView);
var credential = (process.env.XMPPACCT || "alice:hiimalice").split(":");
acct = {
userId: credential[0] + '@xmpp.uproxy.org',
password: credential[1]
};
});
it('sees presence between two friends', function(done) {
it('logs in', function(done) {
var socialClient = freedom('freedom.json', {debug:true});
socialClient.emit('relay', 'onUserProfile');
socialClient.emit('relay', 'onClientState');
credentials.push({
cmd: 'auth',
message: acct
});
socialClient.emit('login', [{

@@ -20,3 +53,4 @@ agent: 'integration',

socialClient.on('onUserProfile', function(prof) {
socialClient.on('onClientState', function(prof) {
expect(prof.status).toEqual('ONLINE');
done();

@@ -23,0 +57,0 @@ });

@@ -1,2 +0,2 @@

/*globals freedom:true,setTimeout,console,VCardStore */
/*globals freedom:true,setTimeout,console,VCardStore,global */
/*jslint indent:2,white:true,sloppy:true */

@@ -9,4 +9,9 @@

var window = {};
// Global declarations for node.js
if (typeof window === 'undefined') {
global.window = {};
global.XMLHttpRequest = {};
}
/**

@@ -199,3 +204,3 @@ * The SocialProvider implements the freedom.js social API

// will be broadcast to all clients.
var messageType = (this.vCardStore.getClient(to).status == 'ONLINE') ?
var messageType = (this.vCardStore.getClient(to).status === 'ONLINE') ?
'normal' : 'chat';

@@ -202,0 +207,0 @@

@@ -1,5 +0,5 @@

/*globals freedom:true,setTimeout,window */
/*globals freedom:true,setTimeout,window,VCardStore:true */
/*jslint indent:2,white:true,sloppy:true */
var VCardStore = function () {
VCardStore = function () {
if (freedom && freedom['core.storage']) {

@@ -6,0 +6,0 @@ this.storage = freedom['core.storage']();

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc