diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2024-11-14 18:10:14 -0500 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2024-11-20 22:02:31 -0500 |
| commit | 4e0f7ced842b538519c64769cd4a5adf010203ca (patch) | |
| tree | 49c3e38e4427f72e87cc35ec3f2786951374512b | |
| parent | merge: Bump develop version (!766) (diff) | |
| download | sharkey-4e0f7ced842b538519c64769cd4a5adf010203ca.tar.gz sharkey-4e0f7ced842b538519c64769cd4a5adf010203ca.tar.bz2 sharkey-4e0f7ced842b538519c64769cd4a5adf010203ca.zip | |
preserve the raw URI in parseUri
| -rw-r--r-- | packages/backend/src/core/activitypub/ApDbResolverService.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/backend/src/core/activitypub/ApDbResolverService.ts b/packages/backend/src/core/activitypub/ApDbResolverService.ts index dd89716d34..f6b50ec704 100644 --- a/packages/backend/src/core/activitypub/ApDbResolverService.ts +++ b/packages/backend/src/core/activitypub/ApDbResolverService.ts @@ -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); |