Choose what goes out to the address book: contacts, companies, departments and the person's own card #10
Labels
No labels
bug
documentation
enhancement
performance
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo-dav#10
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Today the plugin writes one kind of card: every contact of the owner is pushed to the one configured address book (
src/postulo_dav/sync.py:425-457). Nothing chooses which go out; the only way to keep one contact off the phone is to delete its card there. Companies, departments and the person's own card are never written, and a contact's department is dropped, sinceORGcarries the company's name only (src/postulo_dav/sync.py:138,text.py:160-161). The ask:Read here as: Postulo writes cards for the kinds of record the person picks, not only contacts; whether they then stay in step or are a one-off copy is decision 1.
What the plugin should do
Per connection, the person chooses what goes out, into a writable address book they chose (#13):
KIND:orgcards (vCard 4, RFC 6350 §6.1.4), or withX-ABShowAs:COMPANYwhere the book takes only vCard 3 (Apple's property; not tried against iCloud). Name asFNandORG, website asURL, notes asNOTE, and numbers, email and addresses once postulo/postulo#329 gives a company some. Nextcloud Contacts givesKIND:orgno special treatment (nextcloud/contacts#302).ORGunit on their contacts' cards (ORG:Acme;Legal, RFC 6350 §6.6.4), which DAVx5's manual says becomes an Android contact's department (not tried; decision 2). Written only whileemployer_structureis on for the person: the core hides departments otherwise (src/postulo/jobs/structure.pyin the core).contact_details(owner)assembles in the core (src/postulo/documents/rendering.py): name, sign-in email, headline, primary number, location, primary links and identifiers (decision 4).The vCard version follows the book's
supported-address-data, and what is pushed becomes a pairing, both under #8's rules, unless decision 1 goes the other way.The choice per kind fits the connection's settings as they are: a boolean or a fixed-choice
FieldSpecworks today. "Send this company to my address book" from a record's own page, and so "only chosen" contacts, needs a core-drawn action: postulo/postulo#327.Decisions
FN:Legal,ORG:Acme;Legal) would carry nothing but a name: a department in Postulo has no number, address or website (src/postulo/jobs/models.pyin the core). Recommended: theORGunit on contacts' cards only.CARDDAV:principal-addresspoints to (RFC 6352 §7.1.2) overwrites what the person keeps about themselves. Recommended: a separate card Postulo creates in the chosen book, unless the person paired their own card (#8), in which case only the properties Postulo owns are patched. Which email and number a CV prints is open as postulo/postulo#308; this card should follow that choice.Needs from the core
structure_allowed, off the surface). Today onlycontact.company,contact.departmentandconnection.owner.profilereach them: that passes the surface check, which looks at imports, but rests on attributes the surface never promised.Before they land, only the contacts choice (all or none) can ship; reaching companies and departments through a contact, as
card_forreachescontact.companytoday (sync.py:138), would lean on that unpromised reach. Depends on #13 and #8.Done when
KIND:orgin a vCard 4 book and withX-ABShowAs:COMPANYin a vCard 3 one, against the in-memory server; a contact in a department arrives withORG:Company;Unit.uv run postulo-messages extract, fr-fr and pt-pt filled on the commit (the test gates them), the 23 EU catalogues before a tag (uv run pytest -m release). New surface names mean repinning the core (pyproject.toml's dev group pins1d6cdd7e0) and extendingtests/test_surface.py.From the list of DAV plugin improvements of 2026-09-30.
The maintainer's list of 2026-10-02 asks for vCard 4 as the format for contact details. Core issue postulo/postulo#660 covers the writing side with a
.vcfexport, through one mapping offered on the plugin surface.Reusable here: a company as a
KIND:orgcard, a department as theORG:Company;Unitof its contacts, the person's own card limited to what the default CV prints (postulo/postulo#308) and never read back, and phone numbers in international form (postulo/postulo#304). One point to agree: the core leavesNOTEout unless chosen, as #8's decision 5 does, while company cards here carry it.This issue keeps its own scope: the choice per kind of record, the chosen address book, the vCard 3 form with
X-ABShowAs:COMPANY, and staying in step.From the list of improvements of 2026-10-02.