summaryrefslogtreecommitdiff
path: root/packages/backend/src
diff options
context:
space:
mode:
authorKinetix <kinetix@isurf.ca>2025-01-29 09:30:21 -0800
committerKinetix <kinetix@isurf.ca>2025-01-29 09:30:21 -0800
commitbf1f263d7209497e508041c05ce5d8bd1229cf08 (patch)
tree23691d0a4f912f23f0ca0b1fed83e175fe127096 /packages/backend/src
parentAdding robots.txt override via admin control panel (diff)
parentmerge: Support incoming null values for `Person.discoverable` (resolves #908)... (diff)
downloadsharkey-bf1f263d7209497e508041c05ce5d8bd1229cf08.tar.gz
sharkey-bf1f263d7209497e508041c05ce5d8bd1229cf08.tar.bz2
sharkey-bf1f263d7209497e508041c05ce5d8bd1229cf08.zip
Merge remote-tracking branch 'upstream/develop' into configrobotstxt
Diffstat (limited to 'packages/backend/src')
-rw-r--r--packages/backend/src/core/activitypub/models/ApPersonService.ts4
-rw-r--r--packages/backend/src/core/activitypub/type.ts2
2 files changed, 3 insertions, 3 deletions
diff --git a/packages/backend/src/core/activitypub/models/ApPersonService.ts b/packages/backend/src/core/activitypub/models/ApPersonService.ts
index 5c71dbc626..9d326e2737 100644
--- a/packages/backend/src/core/activitypub/models/ApPersonService.ts
+++ b/packages/backend/src/core/activitypub/models/ApPersonService.ts
@@ -398,7 +398,7 @@ export class ApPersonService implements OnModuleInit {
alsoKnownAs: person.alsoKnownAs,
// We use "!== false" to handle incorrect types, missing / null values, and "default to true" logic.
hideOnlineStatus: person.hideOnlineStatus !== false,
- isExplorable: person.discoverable,
+ isExplorable: person.discoverable !== false,
username: person.preferredUsername,
approved: true,
usernameLower: person.preferredUsername?.toLowerCase(),
@@ -602,7 +602,7 @@ export class ApPersonService implements OnModuleInit {
alsoKnownAs: person.alsoKnownAs ?? null,
// We use "!== false" to handle incorrect types, missing / null values, and "default to true" logic.
hideOnlineStatus: person.hideOnlineStatus !== false,
- isExplorable: person.discoverable,
+ isExplorable: person.discoverable !== false,
...(await this.resolveAvatarAndBanner(exist, person.icon, person.image, person.backgroundUrl).catch(() => ({}))),
} as Partial<MiRemoteUser> & Pick<MiRemoteUser, 'isBot' | 'isCat' | 'speakAsCat' | 'isLocked' | 'movedToUri' | 'alsoKnownAs' | 'isExplorable'>;
diff --git a/packages/backend/src/core/activitypub/type.ts b/packages/backend/src/core/activitypub/type.ts
index d67f8cf62e..119a9d8ccb 100644
--- a/packages/backend/src/core/activitypub/type.ts
+++ b/packages/backend/src/core/activitypub/type.ts
@@ -202,7 +202,7 @@ export interface IActor extends IObject {
manuallyApprovesFollowers?: boolean;
movedTo?: string;
alsoKnownAs?: string[];
- discoverable?: boolean;
+ discoverable?: boolean | null;
inbox: string;
sharedInbox?: string; // 後方互換性のため
publicKey?: {