spec(profile): 相互リンク機能のロールによる制御の仕様変更 (MisskeyIO#701)

This commit is contained in:
まっちゃとーにゅ 2024-08-14 20:04:06 +09:00 committed by GitHub
parent 80389a9140
commit 09c419e11b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 61 additions and 43 deletions

View file

@ -111,7 +111,7 @@ export const DEFAULT_POLICIES: RolePolicies = {
rateLimitFactor: 1,
avatarDecorationLimit: 1,
mutualLinkSectionLimit: 1,
mutualLinkLimit: 15,
mutualLinkLimit: 3,
};
@Injectable()

View file

@ -533,7 +533,7 @@ export class UserEntityService implements OnModuleInit {
lang: profile!.lang,
fields: profile!.fields,
verifiedLinks: profile!.verifiedLinks,
mutualLinkSections: profile!.mutualLinkSections,
mutualLinkSections: isMe ? profile!.mutualLinkSections : profile!.mutualLinkSections.slice(0, policies!.mutualLinkSectionLimit).map(section => ({ ...section, mutualLinks: section.mutualLinks.slice(0, policies!.mutualLinkLimit) })),
followersCount: followersCount ?? 0,
followingCount: followingCount ?? 0,
notesCount: user.notesCount,