current outgoings getter
This commit is contained in:
parent
aafdcc37da
commit
b43d45e9e1
1 changed files with 5 additions and 3 deletions
|
|
@ -254,6 +254,8 @@ const onIncomingMessages = (cb, userPK, incomingFeedID, gun, user, SEA) => {
|
||||||
*/
|
*/
|
||||||
let currentOutgoings = {}
|
let currentOutgoings = {}
|
||||||
|
|
||||||
|
const getCurrentOutgoings = () => currentOutgoings
|
||||||
|
|
||||||
/** @type {Set<OutgoingsListener>} */
|
/** @type {Set<OutgoingsListener>} */
|
||||||
const outgoingsListeners = new Set()
|
const outgoingsListeners = new Set()
|
||||||
|
|
||||||
|
|
@ -497,9 +499,9 @@ let currentSeedBackup = null
|
||||||
* @param {UserGUNNode} user
|
* @param {UserGUNNode} user
|
||||||
* @param {ISEA} SEA
|
* @param {ISEA} SEA
|
||||||
* @throws {Error} If user hasn't been auth.
|
* @throws {Error} If user hasn't been auth.
|
||||||
* @returns {Promise<void>}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
const onSeedBackup = async (cb, user, SEA) => {
|
const onSeedBackup = (cb, user, SEA) => {
|
||||||
if (!user.is) {
|
if (!user.is) {
|
||||||
throw new Error(ErrorCode.NOT_AUTH)
|
throw new Error(ErrorCode.NOT_AUTH)
|
||||||
}
|
}
|
||||||
|
|
@ -525,7 +527,7 @@ module.exports = {
|
||||||
onDisplayName,
|
onDisplayName,
|
||||||
onIncomingMessages,
|
onIncomingMessages,
|
||||||
onOutgoing,
|
onOutgoing,
|
||||||
onChats,
|
getCurrentOutgoings,
|
||||||
onSimplerReceivedRequests: require('./onReceivedReqs'),
|
onSimplerReceivedRequests: require('./onReceivedReqs'),
|
||||||
onSimplerSentRequests: require('./onSentReqs').onSentReqs,
|
onSimplerSentRequests: require('./onSentReqs').onSentReqs,
|
||||||
getCurrentSentReqs: require('./onSentReqs').getCurrentSentReqs,
|
getCurrentSentReqs: require('./onSentReqs').getCurrentSentReqs,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue