Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sebu77 committed May 16, 2016
1 parent 384c4f0 commit 7317000
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 62 deletions.
2 changes: 1 addition & 1 deletion clientapp/helpers/avatarHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports.fetch = function (jid, id, type, source, cb) {
return cb(getGravatar(jid));
}

type = resp.vCardTemp.photo.type || type;
type = resp.vCardTemp.photo ? resp.vCardTemp.photo.type : type;

var data = resp.vCardTemp.photo.data;
var uri = 'data:' + type + ';base64,' + data;
Expand Down
2 changes: 1 addition & 1 deletion clientapp/helpers/xmppEventHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ module.exports = function (client, app) {

var id = '';
var type = 'image/png';
if (info.avatars.length > 0) {
if (info.avatars && info.avatars.length > 0) {
id = info.avatars[0].id;
type = info.avatars[0].type || 'image/png';
}
Expand Down
8 changes: 4 additions & 4 deletions clientapp/libraries/jquery.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clientapp/models/ldapUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports.ldapData = function (data) {
data.password = app.config.credentials.password;

return data;
}
};

exports.user = HumanModel.define({
initialize: function (attrs) {
Expand Down
2 changes: 1 addition & 1 deletion clientapp/models/resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = BaseCollection.extend({
return 1;
},
search : function (letters, removeMe, addAll) {
if(letters == "" && !removeMe) return this;
if(letters === "" && !removeMe) return this;

var collection = new module.exports(this.models);
if (addAll)
Expand Down
40 changes: 20 additions & 20 deletions clientapp/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ exports.head = function anonymous(locals) {
exports.includes.bareMessage = function anonymous(locals) {
var buf = [];
with (locals || {}) {
var messageClasses = message.classList;
var messageClasses = [ "message", "message.classList" ];
if (firstEl) {
messageClasses += " first";
messageClasses.push("first");
}
buf.push("<div" + jade.attrs({
id: "chat" + message.cid,
"class": "message" + " " + messageClasses
"class": messageClasses
}, {
"class": true,
id: true
id: true,
"class": true
}) + "><div" + jade.attrs({
title: messageDate.format("{Dow}, {MM}/{dd}/{yyyy} - {h}:{mm} {Tt}"),
"class": "date"
Expand Down Expand Up @@ -247,16 +247,16 @@ exports.includes.messageGroup = function anonymous(locals) {
exports.includes.mucBareMessage = function anonymous(locals) {
var buf = [];
with (locals || {}) {
var messageClasses = message.classList;
var messageClasses = [ "message", "message.classList" ];
if (firstEl) {
messageClasses += " first";
messageClasses.push("first");
}
buf.push("<div" + jade.attrs({
id: "chat" + message.cid,
"class": "message" + " " + messageClasses
"class": messageClasses
}, {
"class": true,
id: true
id: true,
"class": true
}) + "><div" + jade.attrs({
title: messageDate.format("{Dow}, {MM}/{dd}/{yyyy} - {h}:{mm} {Tt}"),
"class": "date"
Expand Down Expand Up @@ -352,16 +352,16 @@ exports.includes.mucWrappedMessage = function anonymous(locals) {
}, {
title: true
}) + ">" + jade.escape((jade.interp = messageDate.format("{h}:{mm} {tt}")) == null ? "" : jade.interp) + "</div></div>");
var messageClasses = message.classList;
var messageClasses = [ "message", "message.classList" ];
if (firstEl) {
messageClasses += " first";
messageClasses.push("first");
}
buf.push("<div" + jade.attrs({
id: "chat" + message.cid,
"class": "message" + " " + messageClasses
"class": messageClasses
}, {
"class": true,
id: true
id: true,
"class": true
}) + "><div" + jade.attrs({
title: messageDate.format("{Dow}, {MM}/{dd}/{yyyy} - {h}:{mm} {Tt}"),
"class": "date"
Expand Down Expand Up @@ -439,16 +439,16 @@ exports.includes.wrappedMessage = function anonymous(locals) {
}, {
title: true
}) + ">" + jade.escape((jade.interp = messageDate.format("{h}:{mm} {tt}")) == null ? "" : jade.interp) + "</div></div>");
var messageClasses = message.classList;
var messageClasses = [ "message", "message.classList" ];
if (firstEl) {
messageClasses += " first";
messageClasses.push("first");
}
buf.push("<div" + jade.attrs({
id: "chat" + message.cid,
"class": "message" + " " + messageClasses
"class": messageClasses
}, {
"class": true,
id: true
id: true,
"class": true
}) + "><div" + jade.attrs({
title: messageDate.format("{Dow}, {MM}/{dd}/{yyyy} - {h}:{mm} {Tt}"),
"class": "date"
Expand Down
6 changes: 3 additions & 3 deletions clientapp/templates/includes/bareMessage.jade
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- var messageClasses = message.classList
- var messageClasses = ['message', 'message.classList']
if firstEl
- messageClasses += ' first'
- messageClasses.push('first')

.message(id='chat'+message.cid, class=messageClasses)
div(id='chat'+message.cid, class=messageClasses)
.date(title=messageDate.format('{Dow}, {MM}/{dd}/{yyyy} - {h}:{mm} {Tt}')) #{messageDate.format('{h}:{mm} {tt}')}
p.body !{message.processedBody}
- var urls = message.urls
Expand Down
2 changes: 1 addition & 1 deletion clientapp/templates/includes/embeds.jade
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- else if (locals.type === 'video' && locals.thumbnail_url)
section.embed.active
a.preview(href=locals.original, target="_blank")
img.embedded(width=locals.width, height=locals.height, src=locals.thumbnail_url, alt=locals.title);
img.embedded(width=locals.width, height=locals.height, src=locals.thumbnail_url, alt=locals.title)
-if (locals.title || locals.description)
.description
-if (locals.title)
Expand Down
6 changes: 3 additions & 3 deletions clientapp/templates/includes/mucBareMessage.jade
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- var messageClasses = message.classList
- var messageClasses = ['message', 'message.classList']
if firstEl
- messageClasses += ' first'
- messageClasses.push('first')

.message(id='chat'+message.cid, class=messageClasses)
div(id='chat'+message.cid, class=messageClasses)
.date(title=messageDate.format('{Dow}, {MM}/{dd}/{yyyy} - {h}:{mm} {Tt}')) #{messageDate.format('{h}:{mm} {tt}')}
p.body !{message.processedBody}
- var urls = message.urls
Expand Down
2 changes: 1 addition & 1 deletion clientapp/views/ldapUserItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ module.exports = HumanView.extend({
persistent: true,
submit:function (e, v, m, f) {
if (v) {
if (f.newPassword1 != '') {
if (f.newPassword1 !== '') {
e.preventDefault();
$.prompt.goToState('state1');
return false;
Expand Down
47 changes: 25 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,49 @@
{
"name": "kaiwa.im",
"description": "Kaiwa: XMPP Client in the Browser",
"version": "1.0.0",
"version": "1.1.0",
"browser": {
"crypto": "crypto-browserify"
},
"dependencies": {
"andlog": "0.0.4",
"andlog": "1.0.0",
"async": "^1.4.0",
"attachmediastream": "1.0.1",
"attachmediastream": "1.3.5",
"backbone": "1.0.0",
"bluebird": "^2.3.2",
"body-parser": "1.12.0",
"bows": "0.3.0",
"compression": "1.2.2",
"body-parser": "1.15.1",
"bows": "1.5.0",
"compression": "1.6.1",
"crypto-browserify": "",
"express": "4.13.3",
"express": "4.13.4",
"frameguard": "2.0.0",
"getconfig": "0.0.5",
"getusermedia": "0.2.1",
"helmet": "0.1.0",
"human-model": "2.6.0",
"getusermedia": "1.3.7",
"helmet": "2.0.0",
"human-model": "2.6.2",
"human-view": "1.8.0",
"jade": "1.8.2",
"jxt": "^3.0.4",
"jxt-xmpp": "^1.2.3",
"jade": "^1.11.0",
"jquery": "",
"jxt": "^3.0.1",
"jxt-xmpp": "^2.0.0",
"jxt-xmpp-types": "^3.0.0",
"ldapjs": "0.7.1",
"moonboots-express": "^3.0",
"node-uuid": "^1.4.1",
"node-uuid": "^1.4.7",
"notify.js": "0.0.3",
"semi-static": "0.0.4",
"serve-static": "1.7.1",
"sound-effect-manager": "1.0.0",
"stanza.io": "7.3.4",
"semi-static": "1.1.2",
"serve-static": "1.10.2",
"sound-effect-manager": "1.0.1",
"stanza.io": "8.0.0",
"staydown": "1.0.3",
"templatizer": "0.1.2",
"underscore": "1.6.0",
"underscore": "1.8.3",
"wildemitter": "^1.0.1",
"xmpp-constants": "^2.2.2"
"xmpp-constants": "^2.2.2",
"x-xss-protection": "1.0.0"
},
"devDependencies": {
"browserify": "^11.0.1",
"browserify": "^13.0.0",
"node-stringprep": "0.8.0",
"precommit-hook": "^3.0.0"
},
"license": "MIT",
Expand Down
10 changes: 6 additions & 4 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ var https = require('https');
var Moonboots = require('moonboots-express');
var express = require('express');
var helmet = require('helmet');
var xssFilter = require('x-xss-protection');
var frameguard = require('frameguard');
var config = require('getconfig');
var templatizer = require('templatizer');
var async = require('async');
Expand All @@ -22,10 +24,10 @@ app.use(bodyParser.urlencoded({ extended: false }));
app.use(compression());
app.use(serveStatic(__dirname + '/public'));
if (!config.isDev) {
app.use(helmet.xframe());
app.use(frameguard());
}
app.use(helmet.iexss());
app.use(helmet.contentTypeOptions());
app.use(xssFilter({ setOnOldIE: true }));
app.use(helmet.noSniff());

var webappManifest = fs.readFileSync('./public/x-manifest.webapp');

Expand Down Expand Up @@ -181,7 +183,7 @@ app.post('/ldap/users', function (req, res) {
attrsOnly: true
};
client.search(config.ldap.base, opts, function(err, data) {
var users = new Array();
var users = [];
if (!err) {
data.on('searchEntry', function(entry) {
var user = {};
Expand Down

0 comments on commit 7317000

Please sign in to comment.