diff --git a/packages/backend/src/models/repositories/note.ts b/packages/backend/src/models/repositories/note.ts index 882cfdd318..ca284b9237 100644 --- a/packages/backend/src/models/repositories/note.ts +++ b/packages/backend/src/models/repositories/note.ts @@ -12,7 +12,6 @@ import { Channels, } from "../index.js"; import type { Packed } from "@/misc/schema.js"; -import { nyaize } from "@/misc/nyaize.js"; import { awaitAll } from "@/prelude/await-all.js"; import { convertLegacyReaction, @@ -263,7 +262,7 @@ export const NoteRepository = db.getRepository(Note).extend({ : {}), }); - if (packed.user.isCat && packed.text) { + /* if (packed.user.isCat && packed.text) { const tokens = packed.text ? mfm.parse(packed.text) : []; mfm.inspect(tokens, (node) => { if (node.type === "text") { @@ -272,7 +271,7 @@ export const NoteRepository = db.getRepository(Note).extend({ } }); packed.text = mfm.toString(tokens); - } + } */ return packed; }, diff --git a/packages/client/src/components/MkPostForm.vue b/packages/client/src/components/MkPostForm.vue index 7ce990b214..f72423d13e 100644 --- a/packages/client/src/components/MkPostForm.vue +++ b/packages/client/src/components/MkPostForm.vue @@ -91,6 +91,7 @@ import { instance } from '@/instance'; import { $i, getAccounts, openAccountMenu as openAccountMenu_ } from '@/account'; import { uploadFile } from '@/scripts/upload'; import { deepClone } from '@/scripts/clone'; +import { nyaize } from '@/scripts/nyaize'; import XCheatSheet from '@/components/MkCheatSheetDialog.vue'; const modal = inject('modal'); @@ -582,6 +583,10 @@ async function post() { } } + if ($i?.isCat) { + postData.text = nyaize(`${postData.text}`); + } + let token = undefined; if (postAccount) { diff --git a/packages/backend/src/misc/nyaize.ts b/packages/client/src/scripts/nyaize.ts similarity index 100% rename from packages/backend/src/misc/nyaize.ts rename to packages/client/src/scripts/nyaize.ts