fix(realtime composer): mentions, channels and emojis not working after @all / @here

Changes requested
MA
15d ago
+28-2

Proposed changes (including videos or screenshots)

In the realtime composer, typing a space right after a mention (@all, @here, @user, #channel) inserted a non-breaking space instead of a regular one. Because of that:

  • the user, channel and emoji autocomplete didn't open for the next word
  • the next mention was rendered as plain text, in the composer and in the sent message

The composer now treats non-breaking spaces as regular spaces when it parses and reads its text, so whatever follows a mention works the same as anywhere else.

Issue(s)

RTC-91

Steps to test or reproduce

  1. Enable the realtime composer (Feature preview).
  2. Open a room and type @all @ (or @here @).
  3. The user autocomplete should open. Pick a user. It should render as a mention.
  4. Repeat with @all # and @all :smi. The channel and emoji autocomplete should open.
  5. Send @here @someuser. Both mentions should render in the message.

Before this fix, steps 3–5 showed no autocomplete, and the second mention rendered as plain text.

Summary by CodeRabbit

  • Bug Fixes
    • Nonbreaking spaces in message text are now treated as regular spaces, allowing adjacent mentions to be recognized separately.