diff --git a/yunkes/src/components/ChatSidebar.vue b/yunkes/src/components/ChatSidebar.vue
index cb85f1b..3eb1af7 100644
--- a/yunkes/src/components/ChatSidebar.vue
+++ b/yunkes/src/components/ChatSidebar.vue
@@ -32,6 +32,15 @@ async function load() {
}
}
+/** 会话显示名:WA 无昵称时去掉 @s.whatsapp.net 后缀只显号码。 */
+function sessionDisplayName(name: string | null | undefined): string {
+ if (!name) return '--'
+ if (name.includes('@s.whatsapp.net')) {
+ return name.replace('@s.whatsapp.net', '')
+ }
+ return name
+}
+
const filtered = computed(() =>
sessions.value
.filter((s) => (filter.value === 'all' ? true : s.type === filter.value))
@@ -69,10 +78,10 @@ watch(() => [props.ownerId, props.channel] as const, load, { immediate: true })
:class="{ 'is-active': isActive(s) }"
@click="emit('select', s)"
>
-