Mastodon: scheduled posts, polls, and visibility levels #152
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The Mastodon API natively supports features our plugin doesn't use: scheduled posts, polls, visibility levels, and content warnings.
Features to Add
Scheduled Posts
scheduled_atparameter (ISO 8601, must be 5+ min in future)ScheduledStatusobject instead ofStatus/api/v1/scheduled_statusesPolls
poll[options][]array parameterpoll[expires_in]secondspoll[multiple]booleanVisibility Levels
visibilityparameter:public,unlisted,private(followers-only),directpublicContent Warnings
spoiler_textparameterImplementation
Add to
MastodonService::publish():$params['scheduled_at']for scheduling$params['poll']for poll data$params['visibility']defaulting topublic$params['spoiler_text']for CWAcceptance Criteria
scheduled_atparameter{visibility}or config defaultReferences
Implemented in commit
5fee5d7. Added toMastodonService::publish(): visibility (public/unlisted/private/direct from params or plugin config), spoiler_text for content warnings, scheduled_at for scheduled posts, poll creation (options/expires_in/multiple, mutually exclusive with media), and language tags. Also fixed broken${CLASS_NAME}namespace in mastodon.xml.Testing Checklist
Migrated from #174
Test Steps
Visibility
Content Warnings
Scheduled Posts
Polls
Language Tags
Namespace Fix
Related