From b43d45e9e10ea315d10a85d491082b399aa2e86d Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Wed, 12 Feb 2020 15:18:40 -0400 Subject: [PATCH] current outgoings getter --- services/gunDB/contact-api/events/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/services/gunDB/contact-api/events/index.js b/services/gunDB/contact-api/events/index.js index 83648c2e..9f186c78 100644 --- a/services/gunDB/contact-api/events/index.js +++ b/services/gunDB/contact-api/events/index.js @@ -254,6 +254,8 @@ const onIncomingMessages = (cb, userPK, incomingFeedID, gun, user, SEA) => { */ let currentOutgoings = {} +const getCurrentOutgoings = () => currentOutgoings + /** @type {Set} */ const outgoingsListeners = new Set() @@ -497,9 +499,9 @@ let currentSeedBackup = null * @param {UserGUNNode} user * @param {ISEA} SEA * @throws {Error} If user hasn't been auth. - * @returns {Promise} + * @returns {void} */ -const onSeedBackup = async (cb, user, SEA) => { +const onSeedBackup = (cb, user, SEA) => { if (!user.is) { throw new Error(ErrorCode.NOT_AUTH) } @@ -525,7 +527,7 @@ module.exports = { onDisplayName, onIncomingMessages, onOutgoing, - onChats, + getCurrentOutgoings, onSimplerReceivedRequests: require('./onReceivedReqs'), onSimplerSentRequests: require('./onSentReqs').onSentReqs, getCurrentSentReqs: require('./onSentReqs').getCurrentSentReqs,