feat: fire updateRemainingLength hook for chats

v1.18.x
Julian Lam 6 years ago
parent 0e07ffa1d9
commit af968c6ae5

@ -64,6 +64,9 @@ define('forum/chats/messages', ['components', 'sounds', 'translator', 'benchpres
var element = parent.find('[component="chat/input"]');
parent.find('[component="chat/message/length"]').text(element.val().length);
parent.find('[component="chat/message/remaining"]').text(config.maximumChatMessageLength - element.val().length);
$(window).trigger('action:chat.updateRemainingLength', {
parent: parent,
});
};
messages.appendChatMessage = function (chatContentEl, data) {

Loading…
Cancel
Save