Skip to content

Commit

Permalink
chore: modify prefs request to allow multiple trusted addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
dhavaldodiya committed May 18, 2022
1 parent b904928 commit b12e31f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/network/edit-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/

import { filter, find, findIndex, forEach, map, reduce } from 'lodash';
import { filter, find, findIndex, forEach, map, reduce, isArray } from 'lodash';
import { SHELL_APP_ID } from '../constants';
import { useAccountStore } from '../store/account/store';
import { AccountState, Mods, Account } from '../../types';
Expand All @@ -22,9 +22,10 @@ export const editSettings = (mods: Mods, appId: string = SHELL_APP_ID): Promise<
: ''
}${
mods.prefs
? `<ModifyPrefsRequest xmlns="urn:zimbraAccount">${map(
mods.prefs,
(pref, key) => `<pref name="${key}">${pref}</pref>`
? `<ModifyPrefsRequest xmlns="urn:zimbraAccount">${map(mods.prefs, (pref, key) =>
isArray(pref)
? map(pref, (p) => `<pref name="${key}">${p}</pref>`).join('')
: `<pref name="${key}">${pref}</pref>`
).join('')}</ModifyPrefsRequest>`
: ''
}${
Expand Down

0 comments on commit b12e31f

Please sign in to comment.