Drop support for HTML posts

This commit is contained in:
silverpill 2022-12-20 18:06:54 +00:00
parent 214258163d
commit 5191727639
2 changed files with 3 additions and 6 deletions

View file

@ -157,7 +157,6 @@ export async function getPostContext(
export interface PostData {
content: string;
content_type: string;
in_reply_to_id: string | null;
visibility: string;
mentions: string[];
@ -172,7 +171,7 @@ export async function createPost(
// Convert to Mastodon API Status entity
const statusData = {
status: postData.content,
content_type: postData.content_type,
content_type: "text/markdown",
"media_ids[]": postData.attachments.map((attachment) => attachment.id),
in_reply_to_id: postData.in_reply_to_id,
visibility: postData.visibility,

View file

@ -120,7 +120,6 @@ import VisibilityIcon from "@/components/VisibilityIcon.vue"
import { useInstanceInfo } from "@/store/instance"
import { useCurrentUser } from "@/store/user"
import { setupAutoResize, triggerResize } from "@/utils/autoresize"
import { renderMarkdownLite } from "@/utils/markdown"
import { fileToDataUrl, dataUrlToBase64 } from "@/utils/upload"
const visibilityMap = Object.entries(VISIBILITY_MAP)
@ -241,10 +240,9 @@ function canPublish(): boolean {
return getCharacterCount() >= 0 && !isLoading
}
async function publish(contentType = "text/markdown") {
async function publish() {
const postData = {
content: contentType === "text/markdown" ? content : renderMarkdownLite(content),
content_type: contentType,
content: content,
in_reply_to_id: props.inReplyTo ? props.inReplyTo.id : null,
visibility: visibility,
mentions: [],