fix(frontend): account phone stored with a plus is not shown with two
This commit is contained in:
1 parent
aff8a9e443
commit
e228d999dd
4 files changed
+10
-5
No files matched your search
@@ -9,7 +9,7 @@
|
||||
import Avatar from "#lib/components/ui/Avatar.svelte";
|
||||
import EmptyState from "#lib/components/ui/EmptyState.svelte";
|
||||
import Icon from "#lib/components/ui/Icon.svelte";
|
||||
import { peerName } from "#lib/format/peer.js";
|
||||
import { formatPhone, peerName } from "#lib/format/peer.js";
|
||||
import { t } from "#lib/i18n/locale.svelte.js";
|
||||
import type { MessageKey } from "#lib/i18n/messages.js";
|
||||
import { accounts } from "#lib/stores/accounts.svelte.js";
|
||||
@@ -73,7 +73,7 @@
|
||||
if (peer?.username) {
|
||||
return `@${peer.username}`;
|
||||
}
|
||||
return peer?.phone ? `+${peer.phone}` : `ID ${targetId}`;
|
||||
return peer?.phone ? formatPhone(peer.phone) : `ID ${targetId}`;
|
||||
}
|
||||
const count = chat?.message_count ?? 0;
|
||||
return count > 0 ? t("profile.messages", { count }) : t("profile.group");
|
||||
|
||||
Reference in new issue
Block a user