feat: Support for _misskey_summary

Co-authored-by: kakkokari-gtyih <daisho7308+f@gmail.com>
ref: https://github.com/misskey-dev/misskey/pull/12184
This commit is contained in:
ThatOneCalculator 2023-10-29 13:37:01 -07:00
parent 3b3320d532
commit 981165ae8b
No known key found for this signature in database
GPG key ID: 8703CACD01000000
4 changed files with 6 additions and 1 deletions

View file

@ -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,

View file

@ -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#",

View file

@ -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,

View file

@ -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 =>