From fff93c696565b9ee46a5ab653766cf1793f94f4f Mon Sep 17 00:00:00 2001 From: Johann150 Date: Sat, 11 Feb 2023 17:25:24 +0100 Subject: [PATCH] activitypub: remove _misskey_content attribute As already noted back in https://github.com/misskey-dev/misskey/pull/8787 the intention was to replace the `_misskey_content` attribute with the ActivityPub-defined `source` property. Misskey and by extension Foundkey have shipped with the `source` property and the respective parsing for quite a while so it seems reasonable to remove it now. Changelog: Removed --- packages/backend/src/remote/activitypub/models/note.ts | 2 -- packages/backend/src/remote/activitypub/renderer/index.ts | 1 - packages/backend/src/remote/activitypub/renderer/note.ts | 1 - 3 files changed, 4 deletions(-) diff --git a/packages/backend/src/remote/activitypub/models/note.ts b/packages/backend/src/remote/activitypub/models/note.ts index fb9621b85..d7adc7b67 100644 --- a/packages/backend/src/remote/activitypub/models/note.ts +++ b/packages/backend/src/remote/activitypub/models/note.ts @@ -207,8 +207,6 @@ export async function createNote(value: string | IObject, resolver: Resolver, si let text: string | null = null; if (note.source?.mediaType === 'text/x.misskeymarkdown' && typeof note.source.content === 'string') { text = note.source.content; - } else if (typeof note._misskey_content !== 'undefined') { - text = note._misskey_content; } else if (typeof note.content === 'string') { text = fromHtml(note.content, quote?.uri); } diff --git a/packages/backend/src/remote/activitypub/renderer/index.ts b/packages/backend/src/remote/activitypub/renderer/index.ts index 37e73d37b..8ec9f7ade 100644 --- a/packages/backend/src/remote/activitypub/renderer/index.ts +++ b/packages/backend/src/remote/activitypub/renderer/index.ts @@ -35,7 +35,6 @@ export const renderActivity = (x: any): IActivity | null => { value: 'schema:value', // Misskey misskey: 'https://misskey-hub.net/ns#', - '_misskey_content': 'misskey:_misskey_content', '_misskey_quote': 'misskey:_misskey_quote', '_misskey_reaction': 'misskey:_misskey_reaction', '_misskey_votes': 'misskey:_misskey_votes', diff --git a/packages/backend/src/remote/activitypub/renderer/note.ts b/packages/backend/src/remote/activitypub/renderer/note.ts index 6fd50c158..5ca251617 100644 --- a/packages/backend/src/remote/activitypub/renderer/note.ts +++ b/packages/backend/src/remote/activitypub/renderer/note.ts @@ -145,7 +145,6 @@ export default async function renderNote(note: Note, dive = true, isTalk = false attributedTo, summary, content, - _misskey_content: text, source: { content: text, mediaType: 'text/x.misskeymarkdown',