feat(scheduling): edit / reschedule a scheduled message
The scheduled-messages tray was cancel-only. Add an inline edit button that re-opens ScheduleMessageModal seeded with the existing body and send-time, letting the user change the text and/or when it sends. MSC4140 has no in-place edit, so an edit is schedule-new + cancel-old. Order matters: the modal schedules the new delayed event first, then we cancel the old one and only prune it from local state once the server confirms. A failed cancel therefore leaves a visible, retriable copy in the tray instead of silently letting the stale message fire or losing the edit. Edits go through the plain-text composer, so rich content collapses to m.text (acceptable for v1). ScheduleMessageModal gains optional initialSendAt (seed the pickers) and title props so it is reusable for both scheduling and editing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -733,7 +733,8 @@ Redacted events display "This message has been deleted" along with the redaction
|
||||
|
||||
- Implements MSC4140 delayed events for scheduling messages to be sent at a future time
|
||||
- `ScheduleMessageModal.tsx` provides the date/time picker UI
|
||||
- A collapsible "Scheduled" tray in the room shows all pending scheduled messages with individual cancel buttons
|
||||
- A collapsible "Scheduled" tray in the room shows all pending scheduled messages with individual edit and cancel buttons
|
||||
- **Edit / reschedule**: the tray's edit button re-opens `ScheduleMessageModal` (seeded with the existing body + send-time) to change the text and/or time. Since MSC4140 has no in-place edit, this is implemented as schedule-new-then-cancel-old; the old copy is only removed once the server confirms cancellation, so a failed cancel leaves a visible, cancellable copy rather than losing the message. Edits go through the plain-text composer (rich content becomes `m.text`).
|
||||
- Utilities in `src/app/utils/scheduledMessages.ts`
|
||||
|
||||
### File Upload Compression (opt-in)
|
||||
|
||||
Reference in New Issue
Block a user