diff options
author | Richard Steinmetz <richard@steinmetz.cloud> | 2022-09-29 14:24:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-29 14:24:52 +0200 |
commit | 74a7b04d48488666665be952d12d7b98e5f2a593 (patch) | |
tree | 9e58b3a87a3a7fa4e7112e9ee72b63495725aa50 /src/components | |
parent | 020811c10b221bbaa1b0b97c5a9f6383935cc916 (diff) | |
parent | 4a08aa9a3c79964c0b6db535ec0ba071cc0d24e0 (diff) |
Merge pull request #2946 from tintou/tintou/fix
Properly decode escaped principal urls
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/AppNavigation/Settings/SettingsAddressbookShare.vue | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/components/AppNavigation/Settings/SettingsAddressbookShare.vue b/src/components/AppNavigation/Settings/SettingsAddressbookShare.vue index 1ec31a5c..c1583e35 100644 --- a/src/components/AppNavigation/Settings/SettingsAddressbookShare.vue +++ b/src/components/AppNavigation/Settings/SettingsAddressbookShare.vue @@ -34,7 +34,7 @@ :user-select="true" open-direction="bottom" track-by="user" - label="user" + label="displayName" @search-change="findSharee" @input="shareAddressbook" /> <!-- list of user or groups addressbook is shared with --> @@ -53,6 +53,7 @@ import client from '../../../services/cdav' import addressBookSharee from './SettingsAddressbookSharee' import debounce from 'debounce' +import { urldecode } from '../../../utils/url.js' export default { name: 'SettingsAddressbookShare', @@ -100,10 +101,7 @@ export default { * @param {boolean} data.isGroup is this a group ? */ shareAddressbook({ user, displayName, uri, isGroup }) { - const addressbook = this.addressbook - uri = decodeURI(uri) - user = decodeURI(user) - this.$store.dispatch('shareAddressbook', { addressbook, user, displayName, uri, isGroup }) + this.$store.dispatch('shareAddressbook', { addressbook: this.addressbook, user, displayName, uri, isGroup }) }, /** @@ -121,10 +119,10 @@ export default { && !this.addressbook.shares.some((share) => share.uri === result.principalScheme)) { const isGroup = result.calendarUserType === 'GROUP' list.push({ - user: result[isGroup ? 'groupId' : 'userId'], + user: urldecode(result[isGroup ? 'groupId' : 'userId']), displayName: result.displayname, icon: isGroup ? 'icon-group' : 'icon-user', - uri: result.principalScheme, + uri: urldecode(result.principalScheme), isGroup, }) } |