tutorial: Narrow to /is/private instead of pm-with welcome-bot.

Main reasons:
* Shouldn't be hardcoding welcome bot

* compose_actions.cancel() was not closing the compose box, for some
  reason. It was working fine before commit a few up from here ("tutorial:
  Remove rest of tutorial."), but I think possibly due to the fact that one
  had to click a button to exit the tutorial (that could be wrong, it was
  hard to pinpoint why it was working before that commit and not after.)

This code should be going away anyway once #5816 is resolved.
This commit is contained in:
Rishi Gupta
2017-07-17 16:42:16 -07:00
committed by Tim Abbott
parent 0c665e9bbe
commit 51bc7801dd

View File

@@ -12,10 +12,7 @@ function set_tutorial_status(status, 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();
narrow.by('is', 'private', {select_first_unread: true, trigger: 'sidebar'});
}
exports.start = function () {