1
0
Fork 0
mirror of https://github.com/paricafe/misskey.git synced 2025-04-06 02:19:33 -05:00

preserve the raw URI in parseUri

This commit is contained in:
Hazelnoot 2024-11-14 18:10:14 -05:00 committed by fly_mc
parent 0595947fc0
commit ccb76ab63c

View file

@ -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);