mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-24 23:15:13 +00:00
fix: code style for primitive 14
This commit is contained in:
parent
322b3b677f
commit
4c432c07cb
1 changed files with 3 additions and 4 deletions
|
@ -157,8 +157,8 @@ export class ApPersonService implements OnModuleInit {
|
||||||
const sharedInboxObject = x.sharedInbox ?? (x.endpoints ? x.endpoints.sharedInbox : undefined);
|
const sharedInboxObject = x.sharedInbox ?? (x.endpoints ? x.endpoints.sharedInbox : undefined);
|
||||||
if (sharedInboxObject != null) {
|
if (sharedInboxObject != null) {
|
||||||
const sharedInbox = getApId(sharedInboxObject);
|
const sharedInbox = getApId(sharedInboxObject);
|
||||||
if (!(typeof sharedInbox === "string" && sharedInbox.length > 0 && this.utilityService.punyHost(sharedInbox) === expectHost)) {
|
if (!(typeof sharedInbox === 'string' && sharedInbox.length > 0 && this.utilityService.punyHost(sharedInbox) === expectHost)) {
|
||||||
throw new Error("invalid Actor: wrong shared inbox");
|
throw new Error('invalid Actor: wrong shared inbox');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,8 +168,7 @@ export class ApPersonService implements OnModuleInit {
|
||||||
if (this.utilityService.punyHost(collectionUri) !== expectHost) {
|
if (this.utilityService.punyHost(collectionUri) !== expectHost) {
|
||||||
throw new Error(`invalid Actor: ${collection} has different host`);
|
throw new Error(`invalid Actor: ${collection} has different host`);
|
||||||
}
|
}
|
||||||
}
|
} else if (collectionUri != null) {
|
||||||
else if (collectionUri != null) {
|
|
||||||
throw new Error(`invalid Actor: wrong ${collection}`);
|
throw new Error(`invalid Actor: wrong ${collection}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue