refactor(config): move mimetype

This commit is contained in:
vulet 2021-01-14 19:00:29 +08:00
parent b287d961f3
commit 78c45451c6
2 changed files with 5 additions and 5 deletions

View file

@ -46,7 +46,7 @@ const run = async (matrixClient, { roomId }, content, replyId, mediaURL, subject
let mediaId = null; let mediaId = null;
const fediverse = registrar.config.fediverse; const fediverse = registrar.config.fediverse;
if(mediaURL) { 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); mediaId = await mediaUpload(fediverse, media);
} }
const response = await axios({ const response = await axios({

View file

@ -4,15 +4,15 @@ module.exports = {
user: 'your_user', user: 'your_user',
password: 'your_password', password: 'your_password',
domains: [ 'your_homeserver.com' ], domains: [ 'your_homeserver.com' ],
mimetypes: {
whitelist: [],
blacklist: []
},
subject: '' subject: ''
}, },
fediverse: { fediverse: {
domain: 'https://your_federation.com', domain: 'https://your_federation.com',
token: 'your_federation_token', token: 'your_federation_token',
mimetypes: {
whitelist: [],
blacklist: []
},
}, },
archive: { archive: {
domain: 'archive.is', domain: 'archive.is',