aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/actor.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/activitypub/actor.ts')
-rw-r--r--server/lib/activitypub/actor.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts
index 63975021c..fb5558ff6 100644
--- a/server/lib/activitypub/actor.ts
+++ b/server/lib/activitypub/actor.ts
@@ -403,7 +403,7 @@ function saveActorAndServerAndModelIfNotExist (
403 // Try to fix non HTTPS accounts of remote instances that fixed their URL afterwards 403 // Try to fix non HTTPS accounts of remote instances that fixed their URL afterwards
404 if (created !== true && actorCreated.url !== actor.url) { 404 if (created !== true && actorCreated.url !== actor.url) {
405 // Only fix http://example.com/account/djidane to https://example.com/account/djidane 405 // Only fix http://example.com/account/djidane to https://example.com/account/djidane
406 if (actorCreated.url.replace('http://', '') !== actor.url.replace('https://', '')) { 406 if (actorCreated.url.replace(/^http:\/\//, '') !== actor.url.replace(/^https:\/\//, '')) {
407 throw new Error(`Actor from DB with URL ${actorCreated.url} does not correspond to actor ${actor.url}`) 407 throw new Error(`Actor from DB with URL ${actorCreated.url} does not correspond to actor ${actor.url}`)
408 } 408 }
409 409