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

@ -2,7 +2,7 @@ import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'type
import { id } from '../id';
import { User } from './user';
import { Page } from './page';
import { notificationTypes } from '@/types';
import { ffVisibility, notificationTypes } from '@/types';
// TODO: このテーブルで管理している情報すべてレジストリで管理するようにしても良いかも
// ただ、「emailVerified が true なユーザーを find する」のようなクエリは書けなくなるからウーン
@ -80,6 +80,12 @@ export class UserProfile {
})
public publicReactions: boolean;
@Column('enum', {
enum: ffVisibility,
default: 'public',
})
public ffVisibility: typeof ffVisibility[number];
@Column('varchar', {
length: 128, nullable: true,
})