From 78c45451c67a690be0437814b34e70b9e2829db1 Mon Sep 17 00:00:00 2001 From: vulet Date: Thu, 14 Jan 2021 19:00:29 +0800 Subject: [PATCH] refactor(config): move mimetype --- commands/fediverse/media.js | 2 +- config.example.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/commands/fediverse/media.js b/commands/fediverse/media.js index c458726..a789a49 100644 --- a/commands/fediverse/media.js +++ b/commands/fediverse/media.js @@ -46,7 +46,7 @@ const run = async (matrixClient, { roomId }, content, replyId, mediaURL, subject let mediaId = null; const fediverse = registrar.config.fediverse; if(mediaURL) { - const media = await mediaDownload(mediaURL, registrar.config.matrix.mimetypes); + const media = await mediaDownload(mediaURL, registrar.config.fediverse.mimetypes); mediaId = await mediaUpload(fediverse, media); } const response = await axios({ diff --git a/config.example.js b/config.example.js index a181608..5efd344 100644 --- a/config.example.js +++ b/config.example.js @@ -4,15 +4,15 @@ module.exports = { user: 'your_user', password: 'your_password', domains: [ 'your_homeserver.com' ], - mimetypes: { - whitelist: [], - blacklist: [] - }, subject: '' }, fediverse: { domain: 'https://your_federation.com', token: 'your_federation_token', + mimetypes: { + whitelist: [], + blacklist: [] + }, }, archive: { domain: 'archive.is',