fix: check if actual response is ScheduledStatus since Mastodon API could post and return Status even if specified scheduled_at in request
This commit is contained in:
parent
8a55a28ba9
commit
029c23bc02
1 changed files with 1 additions and 1 deletions
|
|
@ -134,7 +134,7 @@ export function usePublish(options: {
|
||||||
|
|
||||||
draftItem.value = options.initialDraft()
|
draftItem.value = options.initialDraft()
|
||||||
|
|
||||||
if (scheduledAt)
|
if ('scheduled_at' in status)
|
||||||
// When created a scheduled post, it returns `mastodon.v1.ScheduledStatus` instead
|
// When created a scheduled post, it returns `mastodon.v1.ScheduledStatus` instead
|
||||||
// We want to return only Status, which will be used to route to the posted status page
|
// We want to return only Status, which will be used to route to the posted status page
|
||||||
// ref. Mastodon documentation - https://docs.joinmastodon.org/methods/statuses/#create
|
// ref. Mastodon documentation - https://docs.joinmastodon.org/methods/statuses/#create
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue