diff --git a/src/fetcher/twitter.js b/src/fetcher/twitter.js index 89479ae..be5d602 100644 --- a/src/fetcher/twitter.js +++ b/src/fetcher/twitter.js @@ -40,7 +40,7 @@ module.exports.fn = async (data, opts) => { null, { Accept: 'application/json', - Authorization: `Bearer ${opts.bearerToken}`, + Authorization: `Bearer ${opts.claims.twitter.bearerToken}`, } ) .then(async (data) => { diff --git a/src/fetcher/xmpp.js b/src/fetcher/xmpp.js index c432881..2b7a340 100644 --- a/src/fetcher/xmpp.js +++ b/src/fetcher/xmpp.js @@ -36,7 +36,6 @@ const xmppStart = async (service, username, password) => { const { iqCaller } = xmpp xmpp.start() xmpp.on('online', (address) => { - console.log('online', address.toString()) resolve({ xmpp: xmpp, iqCaller: iqCaller }) }) xmpp.on('error', (error) => { @@ -65,9 +64,9 @@ module.exports.fn = async (data, opts) => { if (!xmpp) { const xmppStartRes = await xmppStart( - opts.service, - opts.username, - opts.password + opts.claims.xmpp.service, + opts.claims.xmpp.username, + opts.claims.xmpp.password ) xmpp = xmppStartRes.xmpp iqCaller = xmppStartRes.iqCaller