From 492f9b83f9f50cb89eb696db552ac2ced35c08ff Mon Sep 17 00:00:00 2001
From: Pascal Bleser
Date: Thu, 23 Oct 2025 17:04:00 +0200
Subject: [PATCH] groupware: fix creating contacts
---
pkg/jmap/jmap_api_contact.go | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/pkg/jmap/jmap_api_contact.go b/pkg/jmap/jmap_api_contact.go
index 0c958415f..e5f435713 100644
--- a/pkg/jmap/jmap_api_contact.go
+++ b/pkg/jmap/jmap_api_contact.go
@@ -110,13 +110,9 @@ func (j *Client) CreateContactCard(accountId string, session *Session, ctx conte
"c": create,
},
}, "0"),
- invocation(CommandContactCardGet, ContactCardGetRefCommand{
+ invocation(CommandContactCardGet, ContactCardGetCommand{
AccountId: accountId,
- IdsRef: &ResultReference{
- ResultOf: "0",
- Name: CommandContactCardSet,
- Path: "/created/c/id",
- },
+ Ids: []string{"#c"},
}, "1"),
)
if err != nil {
@@ -136,7 +132,7 @@ func (j *Client) CreateContactCard(accountId string, session *Session, ctx conte
return CreatedContactCard{}, setErrorError(setErr, EmailType)
}
- if created, ok := setResponse.Created["c"]; !ok || created != nil {
+ if created, ok := setResponse.Created["c"]; !ok || created == nil {
berr := fmt.Errorf("failed to find %s in %s response", string(ContactCardType), string(CommandContactCardSet))
logger.Error().Err(berr)
return CreatedContactCard{}, simpleError(berr, JmapErrorInvalidJmapResponsePayload)