Skip to content

feat: bridge incoming imessage formatting and mentions; fix unnamed new dms - #11

Merged
GraysonCAdams merged 3 commits into
mainfrom
feat/inbound-mentions
Nov 27, 2026
Merged

GraysonCAdams merged 3 commits into
mainfrom
feat/inbound-mentions

Conversation

@GraysonCAdams

Copy link
Copy Markdown
Contributor

rustpush already renders a message's formatting and mentions to HTML (WrappedMessage.html), but the connector never read it, so incoming messages reached Matrix as plain text with an empty m.mentions. Single-part text now carries that HTML as formatted_body, each mention rewritten to a matrix.to link for the mentioned ghost (or the user's own account for their handles) and listed in m.mentions.

The second commit fixes a new contact's DM room staying unnamed. bridgev2 v0.28 pushes a newly named ghost's name to its DM rooms in a goroutine that keeps the room-creation context, which is cancelled when creation returns, so m.room.name fails with "context canceled" and isn't retried. The periodic DM title refresh now picks up a DM whose name or avatar was chosen but never sent.

Test plan

  • go test ./pkg/connector/ -run 'TestRewriteMention|TestDMRoomMetaUnsent'
  • On a live bridge: an affected DM was renamed on the first refresh after deploy

Grayson Adams added 3 commits November 27, 2026 16:58
rustpush renders a message with formatting or mentions to HTML
(WrappedMessage.html, mentions as <a href="tel:...">@name</a>), but the
connector never read it, so every inbound message reached Matrix as plain
text with an empty m.mentions and clients showed "@name" with no pill.

Single-part text messages now carry that HTML as formatted_body, with each
mention rewritten to a matrix.to link for the mentioned ghost, or for the
user's own Matrix account when one of their handles is mentioned, and
listed in m.mentions. Messages split across several events stay plain.
A DM room created by the first message from a new contact stayed unnamed.
bridgev2 v0.28 pushes a newly named ghost's name and avatar to its DM
rooms in a goroutine that keeps the caller's context, which during room
creation is cancelled as soon as creation returns; the m.room.name send
failed with "context canceled" and updateName only retries when the
ghost changes again. Clients then showed the member list, bot included,
as a group-looking room.

The periodic DM title refresh now also treats a DM whose name or avatar
was chosen but not sent as broken and queues a ChatInfoChange, whose
UpdateInfo ends in UpdateInfoFromGhost and resends both.
@GraysonCAdams
GraysonCAdams merged commit 1c9211c into main Nov 27, 2026
4 checks passed
@GraysonCAdams
GraysonCAdams deleted the feat/inbound-mentions branch November 27, 2026 22:11
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