users: Add "(guest)" to names for guest users.

This commit adds code to add "(guest)" to user names of guest
users in the following places -
- right sidebar
- user pills, including the pills in search suggestion typehaead
- typeaheads for user
- sender names in message feed
- user profile popover and modals.
- user name in not subscribed warning banner.

Note that the indicator is shown only if enable_guest_user_indicator
setting is set to true.

As a result of this change, we now translate "deactivated" text
shown in user pills for deactivated users.

Fixes part of #26700.
This commit is contained in:
Sahil Batra
2023-09-13 23:00:52 +05:30
committed by Tim Abbott
parent c51c1d5135
commit 49a047c27f
29 changed files with 100 additions and 9 deletions

View File

@@ -173,6 +173,7 @@ export function warn_if_mentioning_unsubscribed_user(mentioned, $textarea) {
can_subscribe_other_users,
name: mentioned.full_name,
classname: compose_banner.CLASSNAMES.recipient_not_subscribed,
should_add_guest_user_indicator: people.should_add_guest_user_indicator(user_id),
};
const new_row = render_not_subscribed_warning(context);