log
This commit is contained in:
parent
fa8c184b6b
commit
f1f65fe074
1 changed files with 14 additions and 8 deletions
|
|
@ -6,6 +6,7 @@ const Gun = require('gun')
|
||||||
require('gun/lib/open')
|
require('gun/lib/open')
|
||||||
const debounce = require('lodash/debounce')
|
const debounce = require('lodash/debounce')
|
||||||
const Encryption = require('../../../utils/encryptionStore')
|
const Encryption = require('../../../utils/encryptionStore')
|
||||||
|
const logger = require('winston')
|
||||||
|
|
||||||
/** @type {import('../contact-api/SimpleGUN').ISEA} */
|
/** @type {import('../contact-api/SimpleGUN').ISEA} */
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
@ -412,6 +413,7 @@ class Mediator {
|
||||||
|
|
||||||
socket.emit(eventName, encryptedMessage)
|
socket.emit(eventName, encryptedMessage)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
logger.error(err.message)
|
||||||
console.error(err)
|
console.error(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -927,14 +929,18 @@ class Mediator {
|
||||||
if (!this.onSentRequestsSubbed) {
|
if (!this.onSentRequestsSubbed) {
|
||||||
this.onSentRequestsSubbed = true
|
this.onSentRequestsSubbed = true
|
||||||
|
|
||||||
API.Events.onSimplerSentRequests(sentRequests => {
|
API.Events.onSimplerSentRequests(
|
||||||
console.log(`new Reqss in mediator: ${JSON.stringify(sentRequests)}`)
|
debounce(sentRequests => {
|
||||||
this.socket.emit(Event.ON_SENT_REQUESTS, {
|
console.log(
|
||||||
msg: sentRequests,
|
`new Reqss in mediator: ${JSON.stringify(sentRequests)}`
|
||||||
ok: true,
|
)
|
||||||
origBody: body
|
this.socket.emit(Event.ON_SENT_REQUESTS, {
|
||||||
})
|
msg: sentRequests,
|
||||||
})
|
ok: true,
|
||||||
|
origBody: body
|
||||||
|
})
|
||||||
|
}, 1000)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue