Files
zulip/static/js/tutorial.js
Rishi Gupta 0c665e9bbe tutorial: Remove unnecessary actions.
* .screen is no longer being changed by other parts of the tutorial
* first_run_message we don't need, since we're guaranteed to have a message.
* Changing to #home and narrow.deactivate are not needed since we're
  immediately narrowing to PM with welcome-bot.
2017-08-01 22:38:22 -07:00

36 lines
731 B
JavaScript

var tutorial = (function () {
var exports = {};
function set_tutorial_status(status, callback) {
return channel.post({
url: '/json/tutorial_status',
data: {status: JSON.stringify(status)},
success: callback,
});
}
function finale() {
set_tutorial_status("finished");
var sender_bot = "welcome-bot@zulip.com";
narrow.by('pm-with', sender_bot, {select_first_unread: true, trigger: 'sidebar'});
compose_actions.cancel();
}
exports.start = function () {
finale();
};
exports.initialize = function () {
if (page_params.needs_tutorial) {
exports.start();
}
};
return exports;
}());
if (typeof module !== 'undefined') {
module.exports = tutorial;
}