mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 07:23:22 +00:00
[schema][manual] Automatically subscribe users to default streams only after tutorial
(imported from commit 6511851c0aee2628bef597bf1310d6f96b0fd1d4)
This commit is contained in:
@@ -240,6 +240,13 @@ exports.start = function () {
|
||||
tutorial_running = true;
|
||||
add_to_tutorial_stream();
|
||||
run_tutorial(0);
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/json/tutorial_status',
|
||||
data: {status: 'started'}
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
// This technique is not actually that awesome, because it's pretty
|
||||
@@ -256,6 +263,17 @@ exports.stop = function () {
|
||||
if (tutorial_running) {
|
||||
subs.tutorial_unsubscribe_me_from(my_tutorial_stream);
|
||||
tutorial_running = false;
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '/json/tutorial_status',
|
||||
data: {status: 'finished'},
|
||||
success: function () {
|
||||
// We need to reload the streams list so the sidebar is populated
|
||||
// with the new streams
|
||||
subs.reload_subscriptions({clear_first: true});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user