diff --git a/packages/backend/src/remote/activitypub/models/person.ts b/packages/backend/src/remote/activitypub/models/person.ts index ab017b65a..b13ee23e8 100644 --- a/packages/backend/src/remote/activitypub/models/person.ts +++ b/packages/backend/src/remote/activitypub/models/person.ts @@ -313,7 +313,9 @@ export async function createPerson( await transactionalEntityManager.save( new UserProfile({ userId: user.id, - description: person.summary + description: person._misskey_summary + ? truncate(person._misskey_summary, summaryLength) + : person.summary ? htmlToMfm(truncate(person.summary, summaryLength), person.tag) : null, url: url, diff --git a/packages/backend/src/remote/activitypub/renderer/index.ts b/packages/backend/src/remote/activitypub/renderer/index.ts index 7d2eb9528..c60a1f4cd 100644 --- a/packages/backend/src/remote/activitypub/renderer/index.ts +++ b/packages/backend/src/remote/activitypub/renderer/index.ts @@ -43,6 +43,7 @@ export const renderActivity = (x: any): IActivity | null => { _misskey_talk: "misskey:_misskey_talk", _misskey_reaction: "misskey:_misskey_reaction", _misskey_votes: "misskey:_misskey_votes", + _misskey_summary: "misskey:_misskey_summary", isCat: "misskey:isCat", // Fedibird fedibird: "http://fedibird.com/ns#", diff --git a/packages/backend/src/remote/activitypub/renderer/person.ts b/packages/backend/src/remote/activitypub/renderer/person.ts index 9f642bb9e..db176a0dd 100644 --- a/packages/backend/src/remote/activitypub/renderer/person.ts +++ b/packages/backend/src/remote/activitypub/renderer/person.ts @@ -74,6 +74,7 @@ export async function renderPerson(user: ILocalUser) { summary: profile.description ? toHtml(mfm.parse(profile.description)) : null, + _misskey_summary: profile.description, icon: avatar ? renderImage(avatar) : null, image: banner ? renderImage(banner) : null, tag, diff --git a/packages/backend/src/remote/activitypub/type.ts b/packages/backend/src/remote/activitypub/type.ts index 0e63f3ed5..cf0410767 100644 --- a/packages/backend/src/remote/activitypub/type.ts +++ b/packages/backend/src/remote/activitypub/type.ts @@ -205,6 +205,7 @@ export interface IActor extends IObject { }; "vcard:bday"?: string; "vcard:Address"?: string; + _misskey_summary?: string; } export const isCollection = (object: IObject): object is ICollection =>