mirror of
https://github.com/zulip/zulip.git
synced 2026-06-30 21:11:04 +08:00
Earlier, new users were narrowed to the interleaved DMs view on the first visit. This commit updates the behavior to narrow new users in DMs with Welcome Bot. Reason for the change: It makes more sense overall as an interleaved DMs view is a power user view and it would also prevent the message fading banner #29076 from showing up if the user DMs Welcome Bot right away.
28 lines
698 B
JavaScript
28 lines
698 B
JavaScript
import * as channel from "./channel";
|
|
import * as message_view from "./message_view";
|
|
import {page_params} from "./page_params";
|
|
import * as people from "./people";
|
|
|
|
function set_tutorial_status(status, callback) {
|
|
return channel.post({
|
|
url: "/json/users/me/tutorial_status",
|
|
data: {status},
|
|
success: callback,
|
|
});
|
|
}
|
|
|
|
export function initialize() {
|
|
if (page_params.needs_tutorial) {
|
|
set_tutorial_status("started");
|
|
message_view.show(
|
|
[
|
|
{
|
|
operator: "dm",
|
|
operand: people.WELCOME_BOT.user_id,
|
|
},
|
|
],
|
|
{trigger: "sidebar"},
|
|
);
|
|
}
|
|
}
|