Describe the problem
This feature allows users to schedule server-side messages to be sent in all rooms, provided their server supports MSC4140.
matrix-js-sdk supports MSC4140 for delayed events directly making implementation with the existing SDK pretty straightforward.
A PR was generated at #2671 with a working implementation of this feature.
Describe the solution you'd like
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.
Alternatives considered
N/A
Additional context
There are some limitations to this feature:
- The API doesn't provide any method to decrypt scheduled events so events in encrypted rooms can't be retrieved... only deleted
- The server has to support MSC4140 (and have a suitably large max allowable delay).
In regards to the first point - this feels like a minor UX issue but the benefits the feature adds outweigh the cons of this scenario
In regards to the second point: this one is more substantial. If a server does not support MSC4140 this feature should not appear. I've pondered on this a little bit since initial implementation and have figured I should account for situations where the server has a normal, sane max allowable delay limit and someone requests a send delay longer than the max allowable
It doesn't look like there is any way to find the server's current maximum allowable delay so at least a graceful handling of exceeding the server's limit should be added... so I did that. This is probably a lot less clean because it's been a few weeks since I implemented this change initially.
For what it's worth, I've been running a branch built off the first round of changes and everything works as I'd expect.
Describe the problem
This feature allows users to schedule server-side messages to be sent in all rooms, provided their server supports MSC4140.
matrix-js-sdksupports MSC4140 for delayed events directly making implementation with the existing SDK pretty straightforward.A PR was generated at #2671 with a working implementation of this feature.
Describe the solution you'd like
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.
Alternatives considered
N/A
Additional context
There are some limitations to this feature:
In regards to the first point - this feels like a minor UX issue but the benefits the feature adds outweigh the cons of this scenario
In regards to the second point: this one is more substantial. If a server does not support MSC4140 this feature should not appear. I've pondered on this a little bit since initial implementation and have figured I should account for situations where the server has a normal, sane max allowable delay limit and someone requests a send delay longer than the max allowable
It doesn't look like there is any way to find the server's current maximum allowable delay so at least a graceful handling of exceeding the server's limit should be added... so I did that. This is probably a lot less clean because it's been a few weeks since I implemented this change initially.
For what it's worth, I've been running a branch built off the first round of changes and everything works as I'd expect.