Drop support for HTML posts
This commit is contained in:
parent
214258163d
commit
5191727639
2 changed files with 3 additions and 6 deletions
|
@ -157,7 +157,6 @@ export async function getPostContext(
|
||||||
|
|
||||||
export interface PostData {
|
export interface PostData {
|
||||||
content: string;
|
content: string;
|
||||||
content_type: string;
|
|
||||||
in_reply_to_id: string | null;
|
in_reply_to_id: string | null;
|
||||||
visibility: string;
|
visibility: string;
|
||||||
mentions: string[];
|
mentions: string[];
|
||||||
|
@ -172,7 +171,7 @@ export async function createPost(
|
||||||
// Convert to Mastodon API Status entity
|
// Convert to Mastodon API Status entity
|
||||||
const statusData = {
|
const statusData = {
|
||||||
status: postData.content,
|
status: postData.content,
|
||||||
content_type: postData.content_type,
|
content_type: "text/markdown",
|
||||||
"media_ids[]": postData.attachments.map((attachment) => attachment.id),
|
"media_ids[]": postData.attachments.map((attachment) => attachment.id),
|
||||||
in_reply_to_id: postData.in_reply_to_id,
|
in_reply_to_id: postData.in_reply_to_id,
|
||||||
visibility: postData.visibility,
|
visibility: postData.visibility,
|
||||||
|
|
|
@ -120,7 +120,6 @@ import VisibilityIcon from "@/components/VisibilityIcon.vue"
|
||||||
import { useInstanceInfo } from "@/store/instance"
|
import { useInstanceInfo } from "@/store/instance"
|
||||||
import { useCurrentUser } from "@/store/user"
|
import { useCurrentUser } from "@/store/user"
|
||||||
import { setupAutoResize, triggerResize } from "@/utils/autoresize"
|
import { setupAutoResize, triggerResize } from "@/utils/autoresize"
|
||||||
import { renderMarkdownLite } from "@/utils/markdown"
|
|
||||||
import { fileToDataUrl, dataUrlToBase64 } from "@/utils/upload"
|
import { fileToDataUrl, dataUrlToBase64 } from "@/utils/upload"
|
||||||
|
|
||||||
const visibilityMap = Object.entries(VISIBILITY_MAP)
|
const visibilityMap = Object.entries(VISIBILITY_MAP)
|
||||||
|
@ -241,10 +240,9 @@ function canPublish(): boolean {
|
||||||
return getCharacterCount() >= 0 && !isLoading
|
return getCharacterCount() >= 0 && !isLoading
|
||||||
}
|
}
|
||||||
|
|
||||||
async function publish(contentType = "text/markdown") {
|
async function publish() {
|
||||||
const postData = {
|
const postData = {
|
||||||
content: contentType === "text/markdown" ? content : renderMarkdownLite(content),
|
content: content,
|
||||||
content_type: contentType,
|
|
||||||
in_reply_to_id: props.inReplyTo ? props.inReplyTo.id : null,
|
in_reply_to_id: props.inReplyTo ? props.inReplyTo.id : null,
|
||||||
visibility: visibility,
|
visibility: visibility,
|
||||||
mentions: [],
|
mentions: [],
|
||||||
|
|
Loading…
Reference in a new issue