Baris Usakli 12 years ago
commit c262027728

@ -561,20 +561,22 @@ var RDB = require('./redis.js')
return callback(err, null);
var stripped = postData.content,
timestamp = postData.timestamp;
if(postData.content) {
timestamp = postData.timestamp,
returnObj = {
"username": userData.username,
"picture": userData.picture,
"timestamp" : timestamp
};
if (postData.content) {
stripped = postData.content.replace(/>.+\n\n/, '');
postTools.toHTML(stripped, function(err, stripped) {
stripped = utils.strip_tags(stripped);
callback(null, {
"text": stripped,
"username": userData.username,
"picture": userData.picture,
"timestamp" : timestamp
});
returnObj.text = utils.strip_tags(stripped);
callback(null, returnObj);
});
} else {
returnObj.text = '';
callback(null, returnObj);
}
});
});

@ -3,7 +3,7 @@ var utils = require('./../public/src/utils.js'),
crypto = require('crypto'),
emailjs = require('emailjs'),
meta = require('./meta.js'),
emailjsServer = emailjs.server.connect(meta.config.mailer),
emailjsServer = emailjs.server.connect(meta.config.mailer || '127.0.0.1'),
bcrypt = require('bcrypt'),
notifications = require('./notifications.js'),
topics = require('./topics.js'),

Loading…
Cancel
Save