mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
firing hook on chat message load and exposing upload_url to client-side
This commit is contained in:
@@ -82,6 +82,10 @@ define('forum/chats/messages', ['components', 'sounds', 'translator', 'benchpres
|
|||||||
newMessage.find('.timeago').timeago();
|
newMessage.find('.timeago').timeago();
|
||||||
newMessage.find('img:not(.not-responsive)').addClass('img-responsive');
|
newMessage.find('img:not(.not-responsive)').addClass('img-responsive');
|
||||||
messages.scrollToBottom(chatContentEl);
|
messages.scrollToBottom(chatContentEl);
|
||||||
|
|
||||||
|
$(window).trigger('action:chat.received', {
|
||||||
|
messageEl: newMessage,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ var apiController = module.exports;
|
|||||||
apiController.loadConfig = function (req, callback) {
|
apiController.loadConfig = function (req, callback) {
|
||||||
var config = {};
|
var config = {};
|
||||||
config.relative_path = nconf.get('relative_path');
|
config.relative_path = nconf.get('relative_path');
|
||||||
|
config.upload_url = nconf.get('upload_url');
|
||||||
config.siteTitle = validator.escape(String(meta.config.title || meta.config.browserTitle || 'NodeBB'));
|
config.siteTitle = validator.escape(String(meta.config.title || meta.config.browserTitle || 'NodeBB'));
|
||||||
config.browserTitle = validator.escape(String(meta.config.browserTitle || meta.config.title || 'NodeBB'));
|
config.browserTitle = validator.escape(String(meta.config.browserTitle || meta.config.title || 'NodeBB'));
|
||||||
config.titleLayout = (meta.config.titleLayout || '{pageTitle} | {browserTitle}').replace(/{/g, '{').replace(/}/g, '}');
|
config.titleLayout = (meta.config.titleLayout || '{pageTitle} | {browserTitle}').replace(/{/g, '{').replace(/}/g, '}');
|
||||||
|
|||||||
Reference in New Issue
Block a user