From 7a999f2289bdf9d20c61a18863e6aa0fcb4dbb3f Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 21 Jan 2022 02:56:08 +0900 Subject: [PATCH] feat(server): add more metadata for emoji export --- .../backend/src/queue/processors/db/export-custom-emojis.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/queue/processors/db/export-custom-emojis.ts b/packages/backend/src/queue/processors/db/export-custom-emojis.ts index 764356385..92344430d 100644 --- a/packages/backend/src/queue/processors/db/export-custom-emojis.ts +++ b/packages/backend/src/queue/processors/db/export-custom-emojis.ts @@ -11,6 +11,7 @@ import * as dateFormat from 'dateformat'; import { Users, Emojis } from '@/models/index'; import { } from '@/queue/types'; import { downloadUrl } from '@/misc/download-url'; +import config from '@/config/index'; const logger = queueLogger.createSubLogger('export-custom-emojis'); @@ -52,7 +53,7 @@ export async function exportCustomEmojis(job: Bull.Job, done: () => void): Promi }); }; - await writeMeta(`{"metaVersion":2,"emojis":[`); + await writeMeta(`{"metaVersion":2,"host":"${config.host}","exportedAt":"${new Date().toString()}","emojis":[`); const customEmojis = await Emojis.find({ where: {