BETA: Second iMessage Account / Fixes
Highlights
- Run a second iMessage account on one machine, under a single service.
- SMS/RCS/MMS group chats no longer split across rooms or mis-route replies.
- Fixed a bridge hang during auto-reconnect.
Added
Dual iMessage accounts (two Apple IDs)
Bridge two Apple IDs on the same machine (max two), each as its own fully
isolated bridge — separate iMessage login/session, data directory, config, and
Matrix appservice — all running under a single background service.
- Add or reconfigure any time with one command:
corten-matrix setup 1
(self-hosted) orcorten-matrix setup-beeper 1(Beeper). No mid-setup prompts. - One service runs both bridges, so
start/stop/restart/statusact
on both at once.corten-matrix logs 1tails the second account. - macOS note: at most one account can use local chat.db history backfill
(the Apple ID signed into Messages); the other uses CloudKit. This only
affects history backfill — real-time messaging works for both accounts
regardless. (Linux always uses CloudKit.)
Fixed
SMS/RCS/MMS group chats no longer split or mis-route (#60, fixes #58)
- One room per group. Carrier group chats have no stable Apple group ID —
iCloud reports the same group under several different encodings, which
previously sharded one conversation across many Matrix rooms (one case
collapsed from 10 rooms down to 1). Carrier groups are now keyed by their
participant set on both the live and history-backfill paths, so they converge
on a single room. - Replies land in the group, from the right person. A reply in a 3-person
carrier group could be misread as a 1:1 and delivered into a DM with the wrong
contact. Group detection now counts the real members, so replies stay in the
group with the correct sender. - Automatic cleanup of existing duplicates. On startup the bridge
consolidates groups already split under the old scheme — merging the rooms and
re-backfilling history (deduplicated, so nothing is lost). Room moves are
rate-limited per launch to keep startup responsive, finishing over later
restarts if there's a large backlog. - Correct send service. Carrier groups now reliably send over SMS/RCS/MMS
instead of occasionally falling back to iMessage — including RCS/MMS groups and
after a group's membership changes.
iMessage groups and 1:1 DMs are unaffected.
Bridge no longer hangs on auto-reconnect (#63, relates to #56)
After a prolonged receive-wedge, the auto-reconnect could hang indefinitely
(logging "Client disconnection taking long" every 2 seconds until a manual
restart). Disconnect now tears down the APNs connection before stopping the
client and bounds the stop with a timeout, so reconnect always completes.
Internal
- Added unit tests covering carrier-group key convergence, duplicate
consolidation, and room-move selection.
Contributors
Thanks to @needo37 (#60) and @Bijan-A (#63), and to @kgr17 for testing the
second-account support.