mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
added toPid to posts
This commit is contained in:
@@ -14,6 +14,7 @@ var async = require('async'),
|
||||
SocketPosts = {};
|
||||
|
||||
SocketPosts.reply = function(socket, data, callback) {
|
||||
|
||||
if (!socket.uid && !parseInt(meta.config.allowGuestPosting, 10)) {
|
||||
socket.emit('event:alert', {
|
||||
title: 'Reply Unsuccessful',
|
||||
@@ -28,7 +29,9 @@ SocketPosts.reply = function(socket, data, callback) {
|
||||
return callback(new Error('invalid data'));
|
||||
}
|
||||
|
||||
topics.reply(data.topic_id, socket.uid, data.content, function(err, postData) {
|
||||
data.uid = socket.uid;
|
||||
|
||||
topics.reply(data, function(err, postData) {
|
||||
if(err) {
|
||||
if (err.message === 'content-too-short') {
|
||||
module.parent.exports.emitContentTooShortAlert(socket);
|
||||
|
||||
Reference in New Issue
Block a user