summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/web/ClientServerService.ts
diff options
context:
space:
mode:
authormisskey-release-bot[bot] <157398866+misskey-release-bot[bot]@users.noreply.github.com>2025-05-31 12:37:06 +0000
committerGitHub <noreply@github.com>2025-05-31 12:37:06 +0000
commit92b9a5218db145e9bb831cefd36c309de86083b5 (patch)
tree2ebad71633f9bbacabbc193254223146f1662aee /packages/backend/src/server/web/ClientServerService.ts
parentMerge pull request #15933 from misskey-dev/develop (diff)
parentRelease: 2025.5.1 (diff)
downloadmisskey-92b9a5218db145e9bb831cefd36c309de86083b5.tar.gz
misskey-92b9a5218db145e9bb831cefd36c309de86083b5.tar.bz2
misskey-92b9a5218db145e9bb831cefd36c309de86083b5.zip
Merge pull request #16005 from misskey-dev/develop
Release: 2025.5.1
Diffstat (limited to 'packages/backend/src/server/web/ClientServerService.ts')
-rw-r--r--packages/backend/src/server/web/ClientServerService.ts16
1 files changed, 14 insertions, 2 deletions
diff --git a/packages/backend/src/server/web/ClientServerService.ts b/packages/backend/src/server/web/ClientServerService.ts
index 30a911088e..8ca61a497d 100644
--- a/packages/backend/src/server/web/ClientServerService.ts
+++ b/packages/backend/src/server/web/ClientServerService.ts
@@ -212,6 +212,7 @@ export class ClientServerService {
instanceUrl: this.config.url,
metaJson: htmlSafeJsonStringify(await this.metaEntityService.packDetailed(meta)),
now: Date.now(),
+ federationEnabled: this.meta.federation !== 'none',
};
}
@@ -513,7 +514,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 +583,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');