From 2ec4f634ae1794173b61144df7c32d86a9736539 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Sat, 20 Sep 2025 21:17:43 +0800 Subject: [PATCH] feat(wip): remove contact --- server/data/User.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/data/User.ts b/server/data/User.ts index 62501f7..0d6abc5 100644 --- a/server/data/User.ts +++ b/server/data/User.ts @@ -124,6 +124,10 @@ export default class User { ls.push(chatId) this.setAttr("contacts_list", JSON.stringify(ls)) } + removeContacts(contacts: string[]) { + const ls = this.getContactsList().filter((v) => !contacts.includes(v)) + this.setAttr("contacts_list", JSON.stringify(ls)) + } getContactsList() { try { return JSON.parse(this.bean.contacts_list) as string[]