mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 22:49:28 -07:00
Fixed usage of opts
This commit is contained in:
parent
b78766341f
commit
7cf509b6f5
2 changed files with 4 additions and 5 deletions
|
@ -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) => {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue