mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 16:35:47 +01:00
Merge branch 'master' of https://github.com/designcreateplay/NodeBB
This commit is contained in:
@@ -561,20 +561,22 @@ var RDB = require('./redis.js')
|
||||
return callback(err, null);
|
||||
|
||||
var stripped = postData.content,
|
||||
timestamp = postData.timestamp;
|
||||
timestamp = postData.timestamp,
|
||||
returnObj = {
|
||||
"username": userData.username,
|
||||
"picture": userData.picture,
|
||||
"timestamp" : timestamp
|
||||
};
|
||||
|
||||
if(postData.content) {
|
||||
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'),
|
||||
|
||||
Reference in New Issue
Block a user