Skip to content
Snippets Groups Projects
Commit 2ac36e4a authored by Hazelnoot's avatar Hazelnoot
Browse files

merge: Fix federation error "The note creation failed with duplication error...

merge: Fix federation error "The note creation failed with duplication error even when there is no duplication" (resolves #749) (!745)

View MR for information: !745



Closes #749

Approved-by: default avatarTess K <me@thvxl.se>
Approved-by: default avatardakkar <dakkar@thenautilus.net>
parents 4b5a4002 4e0f7ced
No related branches found
No related tags found
2 merge requests!842Bump stable version,!745Fix federation error "The note creation failed with duplication error even when there is no duplication" (resolves #749)
Pipeline #1869 failed with stages
in 1 hour, 22 minutes, and 9 seconds
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment