From 43d3b48996ac4fa812b9f285de49d9e2c0e82bb7 Mon Sep 17 00:00:00 2001 From: 4sterisk <4sterisk@ymail.ne.jp> Date: Sat, 30 Nov 2024 20:39:54 +0900 Subject: [PATCH] =?UTF-8?q?hack(backend):=20=E3=83=96=E3=83=AA=E3=83=83?= =?UTF-8?q?=E3=82=B8=E7=B5=8C=E7=94=B1=E3=81=AEbluesky=E3=81=AE=E8=A8=B1?= =?UTF-8?q?=E5=8F=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/src/core/activitypub/models/ApNoteService.ts | 3 ++- .../backend/src/core/activitypub/models/ApPersonService.ts | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/core/activitypub/models/ApNoteService.ts b/packages/backend/src/core/activitypub/models/ApNoteService.ts index a69ebc1a00b3..427babea6011 100644 --- a/packages/backend/src/core/activitypub/models/ApNoteService.ts +++ b/packages/backend/src/core/activitypub/models/ApNoteService.ts @@ -160,7 +160,8 @@ export class ApNoteService { } if ((this.utilityService.punyHost(url) !== this.utilityService.punyHost(note.id)) && - !(this.utilityService.punyHost(url) === 'www.threads.net' && this.utilityService.punyHost(note.id) === 'threads.net')) { + !(this.utilityService.punyHost(url) === 'www.threads.net' && this.utilityService.punyHost(note.id) === 'threads.net') && + !(this.utilityService.punyHost(url) === 'fed.brid.gy' && this.utilityService.punyHost(note.id) === 'bsky.brid.gy')) { throw new Error(`note url & uri host mismatch: note url: ${url}, note uri: ${note.id}`); } } diff --git a/packages/backend/src/core/activitypub/models/ApPersonService.ts b/packages/backend/src/core/activitypub/models/ApPersonService.ts index 5e2ecc872cbd..7ea9a2794c0b 100644 --- a/packages/backend/src/core/activitypub/models/ApPersonService.ts +++ b/packages/backend/src/core/activitypub/models/ApPersonService.ts @@ -350,7 +350,8 @@ export class ApPersonService implements OnModuleInit { } if ((this.utilityService.punyHost(url) !== this.utilityService.punyHost(person.id)) && - !(this.utilityService.punyHost(url) === 'www.threads.net' && this.utilityService.punyHost(person.id) === 'threads.net')) { + !(this.utilityService.punyHost(url) === 'www.threads.net' && this.utilityService.punyHost(person.id) === 'threads.net') && + !(this.utilityService.punyHost(url) === 'fed.brid.gy' && this.utilityService.punyHost(person.id) === 'bsky.brid.gy')) { throw new Error(`person url <> uri host mismatch: ${url} <> ${person.id}`); } } @@ -554,7 +555,8 @@ export class ApPersonService implements OnModuleInit { } if ((this.utilityService.punyHost(url) !== this.utilityService.punyHost(person.id)) && - !(this.utilityService.punyHost(url) === 'www.threads.net' && this.utilityService.punyHost(person.id) === 'threads.net')) { + !(this.utilityService.punyHost(url) === 'www.threads.net' && this.utilityService.punyHost(person.id) === 'threads.net') && + !(this.utilityService.punyHost(url) === 'fed.brid.gy' && this.utilityService.punyHost(person.id) === 'bsky.brid.gy')) { throw new Error(`person url <> uri host mismatch: ${url} <> ${person.id}`); } }