mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-29 13:59:26 +01:00
preserve the raw URI in parseUri
This commit is contained in:
parent
41536480ce
commit
4e0f7ced84
1 changed files with 3 additions and 2 deletions
|
@ -66,9 +66,10 @@ export class ApDbResolverService implements OnApplicationShutdown {
|
|||
public parseUri(value: string | IObject | [string | IObject]): UriParseResult {
|
||||
const separator = '/';
|
||||
|
||||
const uri = new URL(getApId(value));
|
||||
const apId = getApId(value);
|
||||
const uri = new URL(apId);
|
||||
if (this.utilityService.toPuny(uri.host) !== this.utilityService.toPuny(this.config.host)) {
|
||||
return { local: false, uri: uri.href };
|
||||
return { local: false, uri: apId };
|
||||
}
|
||||
|
||||
const [, type, id, ...rest] = uri.pathname.split(separator);
|
||||
|
|
Loading…
Reference in a new issue