mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-24 13:03:39 +00:00
Feat: UGCの公開範囲設定機能 (#15938)
* wip * Update CHANGELOG.md * wip * wip * Update show.ts
This commit is contained in:
@@ -513,7 +513,12 @@ export class ClientServerService {
|
||||
|
||||
vary(reply.raw, 'Accept');
|
||||
|
||||
if (user != null) {
|
||||
if (
|
||||
user != null && (
|
||||
this.meta.ugcVisibilityForVisitor === 'all' ||
|
||||
(this.meta.ugcVisibilityForVisitor === 'local' && user.host == null)
|
||||
)
|
||||
) {
|
||||
const profile = await this.userProfilesRepository.findOneByOrFail({ userId: user.id });
|
||||
const me = profile.fields
|
||||
? profile.fields
|
||||
@@ -577,7 +582,13 @@ export class ClientServerService {
|
||||
relations: ['user'],
|
||||
});
|
||||
|
||||
if (note && !note.user!.requireSigninToViewContents) {
|
||||
if (
|
||||
note &&
|
||||
!note.user!.requireSigninToViewContents &&
|
||||
(this.meta.ugcVisibilityForVisitor === 'all' ||
|
||||
(this.meta.ugcVisibilityForVisitor === 'local' && note.userHost == null)
|
||||
)
|
||||
) {
|
||||
const _note = await this.noteEntityService.pack(note);
|
||||
const profile = await this.userProfilesRepository.findOneByOrFail({ userId: note.userId });
|
||||
reply.header('Cache-Control', 'public, max-age=15');
|
||||
|
||||
Reference in New Issue
Block a user