mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2026-01-15 14:33:18 +01:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user