mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-28 21:28:19 +01:00
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>
This commit is contained in:
commit
2ac36e4a5c
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