From cf357b833c2656cecd0aaa5dfd16b1a6feae7115 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:29:48 +0900 Subject: [PATCH] Revert "handle xsns.jp as a special suffix" This reverts commit 3c8829ba1017352ddb9a89dc91080e8110f51bf1. --- packages/backend/src/core/UtilityService.ts | 6 ------ packages/backend/test/unit/UtilityService.ts | 2 -- 2 files changed, 8 deletions(-) diff --git a/packages/backend/src/core/UtilityService.ts b/packages/backend/src/core/UtilityService.ts index 7e0321f797..24ded0677d 100644 --- a/packages/backend/src/core/UtilityService.ts +++ b/packages/backend/src/core/UtilityService.ts @@ -131,12 +131,6 @@ export class UtilityService { return mastoHost[1]; } - // XServer SNS - const xserverSns = hostname.match(/\.?([a-zA-Z0-9-]+\.xsns\.jp)$/i); - if (xserverSns) { - return xserverSns[1]; - } - return null; } diff --git a/packages/backend/test/unit/UtilityService.ts b/packages/backend/test/unit/UtilityService.ts index 27f22de917..d86e794f2f 100644 --- a/packages/backend/test/unit/UtilityService.ts +++ b/packages/backend/test/unit/UtilityService.ts @@ -38,8 +38,6 @@ describe('UtilityService', () => { test('special', () => { assert.equal(utilityService.punyHostPSLDomain('http://foo.masto.host'), 'foo.masto.host'); assert.equal(utilityService.punyHostPSLDomain('http://foo.bar.masto.host'), 'bar.masto.host'); - assert.equal(utilityService.punyHostPSLDomain('http://foo.xsns.jp'), 'foo.xsns.jp'); - assert.equal(utilityService.punyHostPSLDomain('http://foo.bar.xsns.jp'), 'bar.xsns.jp'); }); }); });