fix: check if actual response is `ScheduledStatus` since Mastodon API could post and return `Status` even if specified `scheduled_at` in request

shuuji3/feat/scheduled-post
TAKAHASHI Shuuji 2024-03-03 21:23:57 +09:00
rodzic 31d85bb6fd
commit 471c3c03e6
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: F15C887632129F5E
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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