1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-17 17:15:38 +02:00

Fix: Punycodeなインスタンスが重複登録される (#4667)

This commit is contained in:
MeiMei
2019-04-12 20:03:00 +09:00
committed by syuilo
parent 6abc053a48
commit 81006566a5
2 changed files with 6 additions and 2 deletions

View File

@@ -1,9 +1,12 @@
import Instance, { IInstance } from '../models/instance';
import federationChart from '../services/chart/federation';
import { toDbHost } from '../misc/convert-host';
export async function registerOrFetchInstanceDoc(host: string): Promise<IInstance> {
if (host == null) return null;
host = toDbHost(host);
const index = await Instance.findOne({ host });
if (index == null) {