Skip to content

Commit cd9065a

Browse files
committed
feat: update @e4a/pg-js to ^0.7.0, use fluent extraAttribute API
Replace pg.recipient.withPolicy() with the new fluent RecipientBuilder.extraAttribute() chaining.
1 parent 34db59e commit cd9065a

3 files changed

Lines changed: 9 additions & 11 deletions

File tree

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
},
5151
"dependencies": {
5252
"@deltablot/dropzone": "^7.4.3",
53-
"@e4a/pg-js": "^0.6.0",
53+
"@e4a/pg-js": "^0.7.0",
5454
"@iconify/svelte": "^4.0.2",
5555
"@privacybydesign/yivi-css": "^1.0.0-beta.4",
5656
"country-flag-icons": "^1.6.4",

src/lib/components/filesharing/SendButton.svelte

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,11 @@
9898
9999
// Build recipients
100100
const recipients = EncryptState.recipients.map(({ email, extra }) => {
101-
if (extra.length > 0) {
102-
return pg.recipient.withPolicy(email, [
103-
{ t: 'pbdf.sidn-pbdf.email.email', v: email },
104-
...extra.map(a => ({ t: a.t, v: a.v ?? '' })),
105-
])
101+
const r = pg.recipient.email(email)
102+
for (const a of extra) {
103+
r.extraAttribute(a.t, a.v ?? '')
106104
}
107-
return pg.recipient.email(email)
105+
return r
108106
})
109107
110108
// Build sign method — email always included, other attributes optional

0 commit comments

Comments
 (0)