Skip to content

Commit

Permalink
hack(backend): ブリッジ経由のblueskyの許可
Browse files Browse the repository at this point in the history
  • Loading branch information
4ster1sk committed Nov 30, 2024
1 parent bfd131b commit 43d3b48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
}
Expand Down Expand Up @@ -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}`);
}
}
Expand Down

0 comments on commit 43d3b48

Please sign in to comment.