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[]