Skip to content

Commit 0404a16

Browse files
authored
Merge pull request #2348 from h3poteto/fix/quote
Make quote_approval optional in Mastodon status entity
2 parents ea0865b + b0b7c8f commit 0404a16

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

megalodon/src/mastodon/api_client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ namespace MastodonAPI {
630630
emoji_reactions: [],
631631
bookmarked: s.bookmarked ? s.bookmarked : false,
632632
quote: s.quote ? quote(s.quote) : null,
633-
quote_approval: s.quote_approval
633+
quote_approval: s.quote_approval ?? { automatic: [], manual: [], current_user: 'unknown' }
634634
})
635635
export const status_params = (s: Entity.StatusParams): MegalodonEntity.StatusParams => s
636636
export const status_source = (s: Entity.StatusSource): MegalodonEntity.StatusSource => s

megalodon/src/mastodon/entities/status.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export type Status = {
3838
language: string | null
3939
pinned: boolean | null
4040
quote: QuotedStatus | null
41-
quote_approval: QuoteApproval
41+
quote_approval?: QuoteApproval
4242
bookmarked?: boolean
4343
}
4444

0 commit comments

Comments
 (0)