mirror of https://github.com/zulip/zulip.git
onboarding: Narrow new users in DMs with Welcome Bot.
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.
This commit is contained in:
parent
c8aeff9a79
commit
caedcb8b8b
|
@ -55,6 +55,7 @@ let duplicate_full_name_data: FoldDict<Set<number>>;
|
|||
let my_user_id: number;
|
||||
|
||||
export let INACCESSIBLE_USER_NAME: string;
|
||||
export let WELCOME_BOT: CrossRealmBot;
|
||||
|
||||
// We have an init() function so that our automated tests
|
||||
// can easily clear data.
|
||||
|
@ -1390,6 +1391,9 @@ export function add_cross_realm_user(person: CrossRealmBot): void {
|
|||
_add_user(person);
|
||||
}
|
||||
cross_realm_dict.set(person.user_id, person);
|
||||
if (person.full_name === "Welcome Bot") {
|
||||
WELCOME_BOT = person;
|
||||
}
|
||||
}
|
||||
|
||||
export function deactivate(person: User): void {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
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({
|
||||
|
@ -16,8 +17,8 @@ export function initialize() {
|
|||
message_view.show(
|
||||
[
|
||||
{
|
||||
operator: "is",
|
||||
operand: "private",
|
||||
operator: "dm",
|
||||
operand: people.WELCOME_BOT.user_id,
|
||||
},
|
||||
],
|
||||
{trigger: "sidebar"},
|
||||
|
|
|
@ -636,7 +636,7 @@ export function initialize_everything(state_data) {
|
|||
},
|
||||
});
|
||||
// This needs to happen after activity_ui.initialize, so that user_filter
|
||||
// is defined.
|
||||
// is defined. Also, must happen after people.initialize()
|
||||
tutorial.initialize();
|
||||
|
||||
// All overlays, and also activity_ui, must be initialized before hashchange.js
|
||||
|
|
Loading…
Reference in New Issue