Skip to content

Node.js based forum software built for the modern web

fixed quoting

Baris Usaklie24606ff739f
diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js
index 3df9563099..3c24122977 100644
--- a/public/src/forum/topic.js
+++ b/public/src/forum/topic.js
@@ -434,14 +434,13 @@
var pid = $(this).parents('li').attr('data-pid');
socket.once('api:posts.getRawPost', function(data) {
+
quoted = '> ' + data.post.replace(/\n/g, '\n> ') + '\n\n';
require(['composer'], function(cmp) {
cmp.push(tid, null, null, quoted);
});
});
socket.emit('api:posts.getRawPost', { pid: pid });
- // $('.post-window textarea').val('> ' + $('#content_' + pid).html() + '\n');
- // });
}
});
diff --git a/src/websockets.js b/src/websockets.js
index 8d2ed1fe73..6fa55784ec 100644
--- a/src/websockets.js
+++ b/src/websockets.js
@@ -339,7 +339,8 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }),
socket.emit('api:composer.push', {
tid: data.tid,
- title: topicData.title
+ title: topicData.title,
+ body: topicData.body
});
});
} else if (parseInt(data.cid) > 0) {