Commitbc127517Recorded13 Mar 2026Repositorysigil-jmap
Fix CalDAV namespace, SXML whitespace, and JMAP dict key syntax
Message
CalDAV: Use correct namespace URI urn:ietf:params:xml:ns:caldav (was urn:ietf:params:caldav) which caused 403 on Fastmail REPORT requests. Add guard around calendar-home-set discovery with fallback deriving home from principal URL. Fix find-text-in-tree to skip whitespace-only strings. Guard find-elements against non-list SXML nodes.
JMAP: Fix broken (string->keyword "..."): syntax in email.sgl and send.sgl by using dict string key syntax and #{} literals.
Changed
src/sigil/jmap/email.sgl | 7 +++----
src/sigil/jmap/send.sgl | 10 ++++------
2 files changed, 7 insertions(+), 10 deletions(-)Diff
src/sigil/jmap/email.sglmodified
@@ -82,10 +82,9 @@
82
;; Back-reference: use query result IDs 83
(get-call (jmap-call "Email/get" 84
(dict accountId: account-id−85
(string->keyword "#ids"):−86
(dict resultOf: "q0"−87
name: "Email/query"−88
path: "/ids")+85
"#ids" (dict resultOf: "q0"+86
name: "Email/query"+87
path: "/ids") 88
properties: props) 89
"g0")) 90
(response (jmap-request client query-call get-call)))src/sigil/jmap/send.sglmodified
@@ -117,8 +117,8 @@
117
118
(let* ((account-id (jmap-client-account-id client)) 119
;; Build the email object−120
(email (dict mailboxIds: (dict)−121
keywords: (dict (string->keyword "$draft"): #t)))+120
(email #{ mailboxIds: #{}+121
keywords: #{ "$draft" #t } }) 122
(email (if from 123
(dict-set email from: (list->array (list (make-address from)))) 124
email))@@ -176,10 +176,8 @@
176
emailId: "#draft")) 177
;; Move to Sent on success 178
(on-success (if sent-id−179
(dict (string->keyword "#draft"):−180
(dict mailboxIds: (dict-set #{}−181
(string->keyword sent-id) #t)−182
keywords: 'null))+179
#{ "#draft" #{ mailboxIds: #{ sent-id #t }+180
keywords: 'null } } 181
#{})) 182
(submit-call (jmap-call "EmailSubmission/set" 183
(dict accountId: account-id