re-use parsed URI in validateActor
This commit is contained in:
parent
ba9ec3bcee
commit
48fa42b362
1 changed files with 2 additions and 2 deletions
|
|
@ -153,8 +153,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
Add a link
Reference in a new issue