mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-25 07:16:51 +00:00
通讯录可勾选部分好友导出
This commit is contained in:
@@ -10,6 +10,7 @@ interface ContactExportOptions {
|
||||
groups: boolean
|
||||
officials: boolean
|
||||
}
|
||||
selectedUsernames?: string[]
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,6 +41,11 @@ class ContactExportService {
|
||||
return true
|
||||
})
|
||||
|
||||
if (Array.isArray(options.selectedUsernames) && options.selectedUsernames.length > 0) {
|
||||
const selectedSet = new Set(options.selectedUsernames)
|
||||
contacts = contacts.filter(c => selectedSet.has(c.username))
|
||||
}
|
||||
|
||||
if (contacts.length === 0) {
|
||||
return { success: false, error: '没有符合条件的联系人' }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user