ITADN

ContactCard/get omits onlineServices property (data stored correctly, visible via CardDAV)

#2884Openmads397 创建于 2026-03-03
M
mads397commented
### What happened? `ContactCard/set` accepts `onlineServices` entries and stores them correctly (verified via CardDAV PROPFIND which returns `SOCIALPROFILE` vCard entries). However, `ContactCard/get` never returns the `onlineServices` property — not in default responses, not when explicitly listed in `properties`, and not when `properties` is `null` (all properties). ### Reproduction **1. Create contact with onlineServices (correct RFC 9553 map format):** ```json { "using": ["urn:ietf:params:jmap:core", "urn:ietf:params:jmap:contacts"], "methodCalls": [["ContactCard/set", { "accountId": "f", "create": { "c1": { "addressBookIds": {"b": true}, "name": { "components": [ {"kind": "given", "value": "Test"}, {"kind": "surname", "value": "Contact"} ], "isOrdered": true }, "emails": { "e1": {"contexts": {"work": true}, "address": "test@example.com"} }, "phones": { "p1": {"contexts": {"mobile": true}, "number": "+46701234567"} }, "onlineServices": { "s1": {"service": "Signal", "user": "+46701234567"}, "s2": {"service": "Telegram", "user": "@testuser"} } } } }, "c0"]] } ``` Response: `201 created` — contact accepted with no errors. **2. Read contact back via JMAP:** ```json { "using": ["urn:ietf:params:jmap:core", "urn:ietf:params:jmap:contacts"], "methodCalls": [["ContactCard/get", { "accountId": "f", "ids": ["<id>"], "properties": ["name", "emails", "phones", "onlineServices"] }, "c0"]] } ``` Response includes `name`, `emails`, `phones` — but **`onlineServices` is absent**. **3. Verify data IS stored via CardDAV:** ``` PROPFIND /dav/card/<user>/default/ HTTP/1.1 ``` Returns vCard with the entries correctly preserved: ``` SOCIALPROFILE;SERVICE-TYPE=Signal;USERNAME=+46701234567;PROP-ID=s1: SOCIALPROFILE;SERVICE-TYPE=Telegram;USERNAME=@testuser;PROP-ID=s2: ``` ### Expected behavior `ContactCard/get` should return `onlineServices` in the response when the property contains data, per [RFC 9553 §2.6.4](https://www.rfc-editor.org/rfc/rfc9553.html#section-2.6.4). ### Additional notes - `emails` and `phones` round-trip correctly via JMAP — only `onlineServices` is affected. - The JSContact → vCard → JSContact conversion preserves the data for CardDAV but appears to lose `onlineServices` during JMAP serialization. - Vendor-specific properties (`domain.tld:name` per RFC 9553 §1.7.3) are rejected with `invalidProperties` — possibly a separate issue. ### Version v0.15.5 ### What database are you using? RocksDB ### What blob storage are you using? RocksDB ### Where is your directory located? Internal ### What operating system are you using? Linux (aarch64, Raspberry Pi 5) ### Code of Conduct - [X] I agree to follow this project's Code of Conduct
0 条评论