feat: make possible to configure following/followers visibility (#7959)

* feat: make possible to configure following/followers visibility

* add test

* ap

* add ap test

* set Cache-Control

* hide following/followers count
This commit is contained in:
syuilo 2021-11-07 18:04:32 +09:00 committed by GitHub
parent 07526ada45
commit a28c515ef6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 317 additions and 10 deletions

View file

@ -27,7 +27,7 @@ export default async function(user: User) {
title: `${author.name} (@${user.username}@${config.host})`,
updated: notes[0].createdAt,
generator: 'Misskey',
description: `${user.notesCount} Notes, ${user.followingCount} Following, ${user.followersCount} Followers${profile.description ? ` · ${profile.description}` : ''}`,
description: `${user.notesCount} Notes, ${profile.ffVisibility === 'public' ? user.followingCount : '?'} Following, ${profile.ffVisibility === 'public' ? user.followersCount : '?'} Followers${profile.description ? ` · ${profile.description}` : ''}`,
link: author.link,
image: user.avatarUrl ? user.avatarUrl : undefined,
feedLinks: {