mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-12-13 10:28:25 +00:00
re-use parsed URI in validateActor
This commit is contained in:
parent
df0331ea04
commit
d3f672657e
1 changed files with 2 additions and 2 deletions
|
|
@ -155,8 +155,8 @@ export class ApPersonService implements OnModuleInit, OnApplicationShutdown {
|
||||||
*/
|
*/
|
||||||
@bindThis
|
@bindThis
|
||||||
private validateActor(x: IObject, uri: string): IActor {
|
private validateActor(x: IObject, uri: string): IActor {
|
||||||
this.utilityService.assertUrl(uri);
|
const parsedUri = this.utilityService.assertUrl(uri);
|
||||||
const expectHost = this.utilityService.punyHostPSLDomain(uri);
|
const expectHost = this.utilityService.punyHostPSLDomain(parsedUri);
|
||||||
|
|
||||||
if (!isActor(x)) {
|
if (!isActor(x)) {
|
||||||
throw new UnrecoverableError(`invalid Actor ${uri}: unknown type '${x.type}'`);
|
throw new UnrecoverableError(`invalid Actor ${uri}: unknown type '${x.type}'`);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue