feat: switch to using api for quick reply

main
Barış Soner Uşaklı 4 years ago
parent 94f90f5825
commit bda3373dd4

@ -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);
}

Loading…
Cancel
Save