mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-21 17:05:22 +03:00
feat: replace CreateStatusParams
with its superset typeCreateScheduledStatusParams
including an extra scheduledAt
param
ref. CreateScheduledStatusParams | masto - https://neet.github.io/masto.js/types/mastodon.rest.v1.CreateScheduledStatusParams.html
This commit is contained in:
parent
e58a6e8b62
commit
4f4f12d6e1
3 changed files with 3 additions and 3 deletions
|
@ -94,7 +94,7 @@ export function usePublish(options: {
|
|||
language: draftItem.value.params.language || preferredLanguage.value,
|
||||
poll,
|
||||
...(isGlitchEdition.value ? { 'content-type': 'text/markdown' } : {}),
|
||||
} as mastodon.rest.v1.CreateStatusParams
|
||||
} as mastodon.rest.v1.CreateScheduledStatusParams
|
||||
|
||||
if (import.meta.dev) {
|
||||
// eslint-disable-next-line no-console
|
||||
|
|
|
@ -25,7 +25,7 @@ function getDefaultVisibility(currentVisibility: mastodon.v1.StatusVisibility) {
|
|||
: preferredVisibility
|
||||
}
|
||||
|
||||
export function getDefaultDraftItem(options: Partial<Mutable<mastodon.rest.v1.CreateStatusParams> & Omit<DraftItem, 'params'>> = {}): DraftItem {
|
||||
export function getDefaultDraftItem(options: Partial<Mutable<mastodon.rest.v1.CreateScheduledStatusParams> & Omit<DraftItem, 'params'>> = {}): DraftItem {
|
||||
const {
|
||||
attachments = [],
|
||||
initialText = '',
|
||||
|
|
|
@ -48,7 +48,7 @@ export type TranslateFn = ReturnType<typeof useI18n>['t']
|
|||
export interface DraftItem {
|
||||
editingStatus?: mastodon.v1.Status
|
||||
initialText?: string
|
||||
params: MarkNonNullable<Mutable<Omit<mastodon.rest.v1.CreateStatusParams, 'poll'>>, 'status' | 'language' | 'sensitive' | 'spoilerText' | 'visibility'> & { poll: Mutable<mastodon.rest.v1.CreateStatusParams['poll']> }
|
||||
params: MarkNonNullable<Mutable<Omit<mastodon.rest.v1.CreateScheduledStatusParams, 'poll'>>, 'status' | 'language' | 'sensitive' | 'spoilerText' | 'visibility'> & { poll: Mutable<mastodon.rest.v1.CreateScheduledStatusParams['poll']> }
|
||||
attachments: mastodon.v1.MediaAttachment[]
|
||||
lastUpdated: number
|
||||
mentions?: string[]
|
||||
|
|
Loading…
Reference in a new issue