feat(mastodon): Add support for scheduled posts

- Added UI controls (checkbox, date/time pickers) to Post dialog

- Implemented validation logic (min 5 mins future)

- Updated session handler to pass scheduled_at to API
This commit is contained in:
2026-01-11 02:49:46 -06:00
parent cb0bb4cf27
commit 31bab4cf8a
3 changed files with 74 additions and 4 deletions

View File

@@ -65,6 +65,13 @@ class post(messages.basicMessage):
postdata = dict(text=text, attachments=attachments, sensitive=self.message.sensitive.GetValue(), spoiler_text=None)
if postdata.get("sensitive") == True:
postdata.update(spoiler_text=self.message.spoiler.GetValue())
# Check for scheduled post
if hasattr(self.message, 'get_scheduled_at'):
scheduled_at = self.message.get_scheduled_at()
if scheduled_at:
postdata['scheduled_at'] = scheduled_at
self.thread.append(postdata)
self.attachments = []
if update_gui: