From 33a9783ae5cf18e913cfe3f0223ed89aa94e63b4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 9 Apr 2019 23:59:32 +0900 Subject: ドメインは常にPunycodeで保存するように MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/queue/processors/db/import-following.ts | 4 ++-- src/queue/processors/db/import-user-lists.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/queue') diff --git a/src/queue/processors/db/import-following.ts b/src/queue/processors/db/import-following.ts index 07a1639494..aae24b22d6 100644 --- a/src/queue/processors/db/import-following.ts +++ b/src/queue/processors/db/import-following.ts @@ -5,7 +5,7 @@ import follow from '../../../services/following/create'; import parseAcct from '../../../misc/acct/parse'; import { resolveUser } from '../../../remote/resolve-user'; import { downloadTextFile } from '../../../misc/download-text-file'; -import { isSelfHost, toDbHost } from '../../../misc/convert-host'; +import { isSelfHost, toPuny } from '../../../misc/convert-host'; import { Users, DriveFiles } from '../../../models'; const logger = queueLogger.createSubLogger('import-following'); @@ -35,7 +35,7 @@ export async function importFollowing(job: Bull.Job, done: any): Promise { host: null, usernameLower: username.toLowerCase() }) : await Users.findOne({ - host: toDbHost(host), + host: toPuny(host), usernameLower: username.toLowerCase() }); diff --git a/src/queue/processors/db/import-user-lists.ts b/src/queue/processors/db/import-user-lists.ts index ff896c1bef..c7273ea6b4 100644 --- a/src/queue/processors/db/import-user-lists.ts +++ b/src/queue/processors/db/import-user-lists.ts @@ -5,7 +5,7 @@ import parseAcct from '../../../misc/acct/parse'; import { resolveUser } from '../../../remote/resolve-user'; import { pushUserToUserList } from '../../../services/user-list/push'; import { downloadTextFile } from '../../../misc/download-text-file'; -import { isSelfHost, toDbHost } from '../../../misc/convert-host'; +import { isSelfHost, toPuny } from '../../../misc/convert-host'; import { DriveFiles, Users, UserLists, UserListJoinings } from '../../../models'; import { genId } from '../../../misc/gen-id'; @@ -47,7 +47,7 @@ export async function importUserLists(job: Bull.Job, done: any): Promise { host: null, usernameLower: username.toLowerCase() }) : await Users.findOne({ - host: toDbHost(host), + host: toPuny(host), usernameLower: username.toLowerCase() }); -- cgit v1.2.3-freya