Add mentions field to PostData object

This commit is contained in:
silverpill 2022-01-15 16:41:49 +00:00
parent 1f01f6c60d
commit 4dbb59c587
2 changed files with 5 additions and 1 deletions

View file

@ -117,6 +117,7 @@ export interface PostData {
content: string;
in_reply_to_id: string | null;
visibility: string;
mentions: string[];
}
export async function createPost(
@ -131,6 +132,7 @@ export async function createPost(
"media_ids[]": attachment ? [attachment.id] : null,
in_reply_to_id: postData.in_reply_to_id,
visibility: postData.visibility,
mentions: postData.mentions,
}
const response = await http(url, {
method: "POST",

View file

@ -122,8 +122,9 @@ export default class PostEditor extends Vue {
inReplyTo: Post | null = null
content = ""
visibility = "public"
attachment: Attachment | null = null
visibility = "public"
mentions: string[] = []
visibilityMenuVisible = false
errorMessage: string | null = null
@ -183,6 +184,7 @@ export default class PostEditor extends Vue {
content,
in_reply_to_id: this.inReplyTo ? this.inReplyTo.id : null,
visibility: this.visibility,
mentions: this.mentions,
}
let post
try {