diff options
author | Raimund Schlüßler <raimund.schluessler@mailbox.org> | 2020-01-06 20:42:14 +0100 |
---|---|---|
committer | Raimund Schlüßler <raimund.schluessler@mailbox.org> | 2020-01-06 21:46:06 +0100 |
commit | 184a842fb3dcaa8d42745b019e6050d39be0d63f (patch) | |
tree | b16cc9e3f95e8ba46643bd047443ea67994e20b7 | |
parent | 6067621b2678717752821efe60b02c7a73638c06 (diff) |
Hide sharee in list if already shared with him
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
-rw-r--r-- | src/components/Settings/SettingsAddressbookShare.vue | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/Settings/SettingsAddressbookShare.vue b/src/components/Settings/SettingsAddressbookShare.vue index 632aabb2..ce43c655 100644 --- a/src/components/Settings/SettingsAddressbookShare.vue +++ b/src/components/Settings/SettingsAddressbookShare.vue @@ -113,7 +113,8 @@ export default { if (query.length > 0) { const results = await client.principalPropertySearchByDisplayname(query) this.usersOrGroups = results.reduce((list, result) => { - if (['GROUP', 'INDIVIDUAL'].indexOf(result.calendarUserType) > -1) { + if (['GROUP', 'INDIVIDUAL'].indexOf(result.calendarUserType) > -1 + && !this.addressbook.shares.some((share) => share.uri === result.principalScheme)) { const isGroup = result.calendarUserType === 'GROUP' list.push({ user: result[isGroup ? 'groupId' : 'userId'], |