From 0a0aa0e2dbaf345a840b57216906ac52292ae3da Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Tue, 12 Mar 2019 23:38:11 +0900 Subject: Fix #4484 (#4485) * Fix #4484 * import order --- src/queue/processors/db/export-blocking.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/queue/processors/db/export-blocking.ts') diff --git a/src/queue/processors/db/export-blocking.ts b/src/queue/processors/db/export-blocking.ts index e56aec94ac..7f32c06472 100644 --- a/src/queue/processors/db/export-blocking.ts +++ b/src/queue/processors/db/export-blocking.ts @@ -8,7 +8,7 @@ import addFile from '../../../services/drive/add-file'; import User from '../../../models/user'; import dateFormat = require('dateformat'); import Blocking from '../../../models/blocking'; -import config from '../../../config'; +import { getFullApAccount } from '../../../misc/convert-host'; const logger = queueLogger.createSubLogger('export-blocking'); @@ -56,7 +56,7 @@ export async function exportBlocking(job: Bull.Job, done: any): Promise { for (const block of blockings) { const u = await User.findOne({ _id: block.blockeeId }, { fields: { username: true, host: true } }); - const content = u.host ? `${u.username}@${u.host}` : `${u.username}@${config.host}`; + const content = getFullApAccount(u.username, u.host); await new Promise((res, rej) => { stream.write(content + '\n', err => { if (err) { -- cgit v1.2.3-freya