Skip to content

feat: LegacyMessaging dialect - #19

Merged
odolbeau merged 1 commit into
mainfrom
feat/legacy-messaging-dialect
Oct 3, 2026
Merged

odolbeau merged 1 commit into
mainfrom
feat/legacy-messaging-dialect

Conversation

@odolbeau

@odolbeau odolbeau commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Third step of the vendor layer: the LegacyMessaging dialect, for the instant messaging properties address books wrote before IMPP (RFC 4770), and still write.

Reading

Property Service
X-AIM AIM
X-ICQ ICQ
X-JABBER Jabber
X-MSN MSN
X-YAHOO Yahoo
X-SKYPE, X-SKYPE-USERNAME Skype
X-QQ QQ
X-GOOGLE-TALK, X-GTALK GoogleTalk
X-GADUGADU GaduGadu
X-SIP SIP

X-AIM;TYPE=home:jdoe is read as SOCIALPROFILE;VALUE=text;SERVICE-TYPE=AIM;TYPE=home:jdoe (RFC 9554). In JSContact, that is an online service with service and user. The value is a user name, so no URI such as aim:jdoe is made up. The service names are the ones Apple writes in X-SERVICE-TYPE.

Writing

A text online service (a user, no URI) of one of these services is written back as its property. When two properties exist for a service, the more common one is used: X-SKYPE, X-GOOGLE-TALK. Other services, and services with a URI, stay as they are.

Dialect order

The encoder now applies dialects in the reverse order of the list, so the same list works both ways. With [new Apple(), new LegacyMessaging()], LegacyMessaging writes X-AIM before Apple turns the remaining text profiles into X-SOCIALPROFILE.

Refactoring

The helpers both dialects use move to the internal Dialect\Internal\VCardEdit class.

Tests

The Android export converts to online services, contexts and preference are kept, Cards are written back, the write order is checked, and four real exports survive a round trip through [Apple, LegacyMessaging].

🤖 Generated with Claude Code

Reads and writes the instant messaging properties address books wrote
before IMPP, such as X-AIM or X-JABBER, as online services with a
service and a user name. The encoder now applies dialects in reverse
order, so that the same list works both ways. The helpers dialects share
move to an internal class.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@odolbeau
odolbeau merged commit 39dab60 into main Oct 3, 2026
4 checks passed
@odolbeau
odolbeau deleted the feat/legacy-messaging-dialect branch October 3, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant