|
|
|
@ -2,7 +2,9 @@
|
|
|
|
|
|
|
|
|
|
/*globals $, app, ajaxify, socket*/
|
|
|
|
|
|
|
|
|
|
define('persona/quickreply', ['components', 'composer/autocomplete'], function(components, autocomplete) {
|
|
|
|
|
define('persona/quickreply', [
|
|
|
|
|
'components', 'composer/autocomplete', 'api'
|
|
|
|
|
], function(components, autocomplete, api) {
|
|
|
|
|
var QuickReply = {};
|
|
|
|
|
|
|
|
|
|
QuickReply.init = function() {
|
|
|
|
@ -36,8 +38,7 @@ define('persona/quickreply', ['components', 'composer/autocomplete'], function(c
|
|
|
|
|
handle: undefined,
|
|
|
|
|
content: replyMsg
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
socket.emit('posts.reply', replyData, function(err, data) {
|
|
|
|
|
api.post(`/topics/${ajaxify.data.tid}`, replyData, function (err, data) {
|
|
|
|
|
if (err) {
|
|
|
|
|
return app.alertError(err.message);
|
|
|
|
|
}
|
|
|
|
|