fix(message-parser): link addresses under the private-use .internal domain

MR
21h ago
+18-1

Closes #32688

Proposed changes

The message parser only auto-links hosts whose suffix is on the public suffix list, plus localhost and the domains listed in Message_CustomDomain_AutoLink. ICANN reserved .internal for private networks in 2024, so it will never be on that list, and addresses like https://wiki.corp.internal/page rendered as plain text, even with an explicit scheme.

  • autoLink (packages/message-parser/src/utils.ts) now treats internal as a valid host by default, the same way it already treats localhost.
  • Other unknown suffixes are unchanged (https://internaltool.testt still isn't linked), and Message_CustomDomain_AutoLink works as before.

Steps to test or reproduce

  1. Send https://wiki.corp.internal/page and wiki.internal in any room.
  2. Before: both show as plain text. After: both are links.

Tests

tests/url.test.ts: the two .internal cases fail on develop and pass with this change. All 734 message-parser tests pass.

Summary by CodeRabbit

  • Bug Fixes
    • Links to .internal addresses now render as links instead of plain text.