From 471c3c03e60489f1df004d10e7e8978560e54424 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Sun, 3 Mar 2024 21:23:57 +0900 Subject: [PATCH] fix: check if actual response is `ScheduledStatus` since Mastodon API could post and return `Status` even if specified `scheduled_at` in request --- composables/masto/publish.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composables/masto/publish.ts b/composables/masto/publish.ts index f3a8013a..3b4e028c 100644 --- a/composables/masto/publish.ts +++ b/composables/masto/publish.ts @@ -133,7 +133,7 @@ export function usePublish(options: { draftItem.value = options.initialDraft() - if (scheduledAt) + if ('scheduled_at' in status) // 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 // ref. Mastodon documentation - https://docs.joinmastodon.org/methods/statuses/#create