Scheduling from the composer drops formatting, mentions and the reply relation #36

Closed
opened 2026-09-12 01:51:06 -04:00 by jared · 0 comments
Owner

Severity: medium · Type: bug · Confidence: high

Location: src/app/features/room/RoomInput.tsx:646-704 (buildCurrentTextContent), :1451-1456, src/app/features/room/ScheduleMessageModal.tsx:34-36,127

Problem

handleScheduleClick builds a full IContentformatted_body, m.mentions, and the m.in_reply_to/thread relation from the active reply draft — but the modal only accepts initialBody?: string and rebuilds { body, msgtype: 'm.text' } from a plain textarea. Everything except the plain body is discarded. handleScheduled then clears the reply draft and the composer, so a user who was composing a formatted reply and chose "schedule" loses the reply target and all markdown with no warning. (The docs acknowledge this only for the edit flow, not for the initial schedule.)

How to trigger

Reply to a message, type **bold** @someone, click Schedule, send. The delivered message is unformatted, unthreaded, un-mentioning plain text.

Suggested fix

Pass the whole IContent through the modal (letting the textarea edit only body, re-deriving formatted_body or dropping the rich fields only when the body was edited) and preserve m.relates_to/m.mentions.


Filed from the September 2026 client audit (branch lotus @ 4bea4895).

**Severity:** medium · **Type:** bug · **Confidence:** high **Location:** `src/app/features/room/RoomInput.tsx:646-704` (`buildCurrentTextContent`), `:1451-1456`, `src/app/features/room/ScheduleMessageModal.tsx:34-36,127` ### Problem `handleScheduleClick` builds a full `IContent` — `formatted_body`, `m.mentions`, and the `m.in_reply_to`/thread relation from the active reply draft — but the modal only accepts `initialBody?: string` and rebuilds `{ body, msgtype: 'm.text' }` from a plain textarea. Everything except the plain body is discarded. `handleScheduled` then clears the reply draft and the composer, so a user who was composing a formatted reply and chose "schedule" loses the reply target and all markdown with no warning. (The docs acknowledge this only for the *edit* flow, not for the initial schedule.) ### How to trigger Reply to a message, type `**bold** @someone`, click Schedule, send. The delivered message is unformatted, unthreaded, un-mentioning plain text. ### Suggested fix Pass the whole `IContent` through the modal (letting the textarea edit only `body`, re-deriving `formatted_body` or dropping the rich fields only when the body was edited) and preserve `m.relates_to`/`m.mentions`. --- _Filed from the September 2026 client audit (branch `lotus` @ 4bea4895)._
jared added this to the Audit 2026-09 · Medium & Low milestone 2026-09-12 01:51:06 -04:00
jared added the bugpriority: mediumarea: messaging labels 2026-09-12 01:51:06 -04:00
jared self-assigned this 2026-09-12 01:51:06 -04:00
jared closed this issue 2026-09-15 21:32:08 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
2026-11-14
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#36