From af968c6ae589fa19aef3edb86daa5569180c6acc Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 1 Aug 2019 12:12:46 -0400 Subject: [PATCH] feat: fire updateRemainingLength hook for chats --- public/src/client/chats/messages.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/src/client/chats/messages.js b/public/src/client/chats/messages.js index 502ce0f6e9..4f87bf5d14 100644 --- a/public/src/client/chats/messages.js +++ b/public/src/client/chats/messages.js @@ -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) {