diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2024-11-22 10:37:11 +0000 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2024-11-22 10:37:11 +0000 |
| commit | 2ac36e4a5c98ee19e30ade0f9dbd0f450f858be4 (patch) | |
| tree | c54d322b219277b1e16a92ee4d0b36cd159ed841 | |
| parent | merge: Allow Update activities for non-note posts (resolves #794) (!728) (diff) | |
| parent | preserve the raw URI in parseUri (diff) | |
| download | sharkey-2ac36e4a5c98ee19e30ade0f9dbd0f450f858be4.tar.gz sharkey-2ac36e4a5c98ee19e30ade0f9dbd0f450f858be4.tar.bz2 sharkey-2ac36e4a5c98ee19e30ade0f9dbd0f450f858be4.zip | |
merge: Fix federation error "The note creation failed with duplication error even when there is no duplication" (resolves #749) (!745)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/745
Closes #749
Approved-by: Tess K <me@thvxl.se>
Approved-by: dakkar <dakkar@thenautilus.net>
| -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); |