mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 02:17:19 +00:00
Don't initialize bot_data until after people.initialize()
bot_data initialization depends on the results of people.initialize(); for example, to determine whether a bot is owned by the current user.
This commit is contained in:
@@ -55,11 +55,11 @@ var bot_data = (function () {
|
|||||||
return bots[email];
|
return bots[email];
|
||||||
};
|
};
|
||||||
|
|
||||||
$(function init() {
|
exports.initialize = function () {
|
||||||
_.each(page_params.realm_bots, function (bot) {
|
_.each(page_params.realm_bots, function (bot) {
|
||||||
exports.add(bot);
|
exports.add(bot);
|
||||||
});
|
});
|
||||||
});
|
};
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
}());
|
}());
|
||||||
|
|||||||
@@ -242,6 +242,7 @@ $(function () {
|
|||||||
// initialize other stuff
|
// initialize other stuff
|
||||||
reload.initialize();
|
reload.initialize();
|
||||||
people.initialize();
|
people.initialize();
|
||||||
|
bot_data.initialize(); // Must happen after people.initialize()
|
||||||
markdown.initialize();
|
markdown.initialize();
|
||||||
composebox_typeahead.initialize();
|
composebox_typeahead.initialize();
|
||||||
search.initialize();
|
search.initialize();
|
||||||
|
|||||||
Reference in New Issue
Block a user