mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
people: Remove is_current_user legacy helper.
This does lookups by email address, which is very much a legacy way to do things, and could throw exceptions if trying to lookup details on an unknown user ID.
This commit is contained in:
@@ -352,7 +352,7 @@ export function pick_empty_narrow_banner(current_filter: Filter): NarrowBannerDa
|
||||
if (!first_operand.includes(",")) {
|
||||
const recipient_user = people.get_by_user_id(user_ids[0]);
|
||||
// You have no direct messages with this person
|
||||
if (people.is_current_user(recipient_user.email)) {
|
||||
if (people.is_my_user_id(recipient_user.user_id)) {
|
||||
return {
|
||||
title: $t({
|
||||
defaultMessage:
|
||||
@@ -456,7 +456,7 @@ export function pick_empty_narrow_banner(current_filter: Filter): NarrowBannerDa
|
||||
),
|
||||
};
|
||||
}
|
||||
if (people.is_current_user(first_operand)) {
|
||||
if (people.is_my_user_id(person_in_dms.user_id)) {
|
||||
return {
|
||||
title: $t({
|
||||
defaultMessage: "You don't have any direct message conversations yet.",
|
||||
|
Reference in New Issue
Block a user