mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-15 05:19:58 +00: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,
|
language: draftItem.value.params.language || preferredLanguage.value,
|
||||||
poll,
|
poll,
|
||||||
...(isGlitchEdition.value ? { 'content-type': 'text/markdown' } : {}),
|
...(isGlitchEdition.value ? { 'content-type': 'text/markdown' } : {}),
|
||||||
} as mastodon.rest.v1.CreateStatusParams
|
} as mastodon.rest.v1.CreateScheduledStatusParams
|
||||||
|
|
||||||
if (import.meta.dev) {
|
if (import.meta.dev) {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
|
|
|
@ -25,7 +25,7 @@ function getDefaultVisibility(currentVisibility: mastodon.v1.StatusVisibility) {
|
||||||
: preferredVisibility
|
: 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 {
|
const {
|
||||||
attachments = [],
|
attachments = [],
|
||||||
initialText = '',
|
initialText = '',
|
||||||
|
|
|
@ -48,7 +48,7 @@ export type TranslateFn = ReturnType<typeof useI18n>['t']
|
||||||
export interface DraftItem {
|
export interface DraftItem {
|
||||||
editingStatus?: mastodon.v1.Status
|
editingStatus?: mastodon.v1.Status
|
||||||
initialText?: string
|
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[]
|
attachments: mastodon.v1.MediaAttachment[]
|
||||||
lastUpdated: number
|
lastUpdated: number
|
||||||
mentions?: string[]
|
mentions?: string[]
|
||||||
|
|
Loading…
Reference in a new issue