Skip to content

Add Support For Scheduled Messages via MSC4140#2671

Open
jasonlaguidice wants to merge 2 commits intocinnyapp:devfrom
jasonlaguidice:feature/msc4140-scheduled-messages
Open

Add Support For Scheduled Messages via MSC4140#2671
jasonlaguidice wants to merge 2 commits intocinnyapp:devfrom
jasonlaguidice:feature/msc4140-scheduled-messages

Conversation

@jasonlaguidice
Copy link

@jasonlaguidice jasonlaguidice commented Feb 20, 2026

Description

This PR adds the ability to schedule messages in rooms (both encrypted and otherwise) using the framework established in MSC4140 (cancellable delayed events).

I noticed that the API Cinny uses already has support for the unstable spec endpoints so this seemed like a pretty easy add.

image

This adds a chevron next to the send button which opens a simple date/time picker. When selected to schedule, the send icon changes to a clock and is given a color to indicate this will schedule the message instead of send per normal. The message is sent as a delayed event using MSC4140. There are some limitations to this - the API doesn't provide any method to decrypt these events so scheduled events in encrypted rooms can't be retrieved... only deleted. The other notable one is that the server has to support MSC4140 (and have a suitably large max allowable delay).

image image

The chevron and options should only appear if the server reports that it supports MSC4140.

Scheduled messages in the selected room, if present, will display a chip with the count of scheduled messages. Clicking the chip will expand the selection, showing all scheduled messages in the room with the option to edit the message or cancel the scheduled send. As mentioned above - encrypted messages will NOT be previewed (and are just displayed as Encrypted Message) and there is no option to edit - only delete.

I have tested this against my homeserver and everything seems to be working as intended. But would like to open this up for others to help push buttons and find scenarios when this shouldn't work.

Future/pending changes to the Matrix API used should be simple fixes, if required at all.

Fixes #

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@github-actions
Copy link

github-actions bot commented Feb 20, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@jasonlaguidice
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

ajbura added a commit to cinnyapp/cla that referenced this pull request Feb 20, 2026
@jasonlaguidice jasonlaguidice force-pushed the feature/msc4140-scheduled-messages branch 2 times, most recently from 7d7b865 to 3b7e7b4 Compare March 4, 2026 03:42
@dollth-ing
Copy link

I have read the CLA Document and I hereby sign the CLA

@ajbura
Copy link
Member

ajbura commented Mar 14, 2026

Thanks for the contribution! 🙌

For new features, we usually ask contributors to first open an issue or start a discussion so the maintainers can review the proposal and make sure it aligns with the project's roadmap.

Could you please create a feature request issue describing the motivation and proposed solution? Once the discussion is complete and the feature is approved, we’ll be happy to review the PR.

I’ll keep this PR on hold for now until the issue is created and discussed. Thanks again for your effort!

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.

3 participants