[backend] Add _misskey_summary field

This fixes federation of MFM in user bios between *key instances

Co-authored-by: default avatarkakkokari-gtyih <daisho7308+f@gmail.com>
ref: https://github.com/misskey-dev/misskey/pull/12184
This commit is contained in:
Laura Hausmann 2023-11-05 14:49:44 +01:00
parent b6ee1c5dc4
commit 9d4f74d290
Signed by: zotan
GPG key ID: D044E84C5BE01605
4 changed files with 8 additions and 3 deletions

View file

@ -604,9 +604,11 @@ export async function updatePerson(
{
url: url,
fields,
description: person.summary
? await htmlToMfm(truncate(person.summary, summaryLength), person.tag)
: null,
description: person._misskey_summary
? truncate(person._misskey_summary, summaryLength)
: person.summary
? await htmlToMfm(truncate(person.summary, summaryLength), person.tag)
: null,
birthday: bday ? bday[0] : null,
location: person["vcard:Address"] || null,
},

View file

@ -41,6 +41,7 @@ export const renderActivity = (x: any): IActivity | null => {
_misskey_reaction: "misskey:_misskey_reaction",
_misskey_votes: "misskey:_misskey_votes",
_misskey_talk: "misskey:_misskey_talk",
_misskey_summary: "misskey:_misskey_summary",
isCat: "misskey:isCat",
// Fedibird
fedibird: "http://fedibird.com/ns#",

View file

@ -75,6 +75,7 @@ export async function renderPerson(user: ILocalUser) {
summary: profile.description
? await toHtml(mfm.parse(profile.description), profile.mentions, profile.userHost)
: null,
_misskey_summary: profile.description,
icon: avatar ? renderImage(avatar) : null,
image: banner ? renderImage(banner) : null,
tag,

View file

@ -206,6 +206,7 @@ export interface IActor extends IObject {
};
"vcard:bday"?: string;
"vcard:Address"?: string;
_misskey_summary?: string;
}
export const isCollection = (object: IObject): object is ICollection =>