Skip to content

Commit 3834c6a

Browse files
authored
feat: Add new quote fields to status object (#1354)
1 parent c776061 commit 3834c6a

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/mastodon/rest/v1/statuses.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,24 @@ export interface FetchStatusesParams {
1717
readonly id: readonly string[];
1818
}
1919

20+
export interface QuoteApprovalPolicyRegistry {
21+
public: never;
22+
followers: never;
23+
nobody: never;
24+
}
25+
26+
export type QuoteApprovalPolicy = keyof QuoteApprovalPolicyRegistry;
27+
2028
export interface CreateStatusParamsBase {
2129
/** ID of the status being replied to, if status is a reply */
2230
readonly inReplyToId?: string | null;
31+
/** ID of the status being quoted, if any. Will raise an error if the status does not exist, the author does not have access to it, or quoting is denied by Mastodon’s understanding of the attached quote policy. All posts except Private Mentions (direct visibility) are quotable by their author. Quoting a private post will restrict the quoting post’s visibility to private or direct (if the given visibility is public or unlisted, private will be used instead). An error will be returned when making a quote post with direct visibility and the quote author is not explicitly mentioned. If the status text doesn’t include a link to the quoted post, Mastodon will prepend a <p class="quote-inline">RE: <a href="…">…</a></p> paragraph for backward compatibility (such a paragraph will be hidden by Mastodon’s web interface). */
32+
readonly quotedStatusId?: string | null;
33+
/** Sets who is allowed to quote the status. When omitted, the user’s default setting will be used instead. Ignored if visibility is private or direct, in which case the policy will always be set to nobody.
34+
public = Anyone is allowed to quote this status and will have their quote automatically accepted, unless they are blocked.
35+
followers = Only followers and the author are allowed to quote this status, and will have their quote automatically accepted.
36+
nobody = Only the author is allowed to quote the status.*/
37+
readonly quoteApprovalPolicy?: QuoteApprovalPolicy | null;
2338
/** Mark status and attached media as sensitive? */
2439
readonly sensitive?: boolean | null;
2540
/** Text to be shown as a warning or subject before the actual content. Statuses are generally collapsed behind this field. */

0 commit comments

Comments
 (0)