tweaks
This commit is contained in:
parent
4614ed599d
commit
aafdcc37da
1 changed files with 4 additions and 3 deletions
|
|
@ -11,6 +11,7 @@ const Streams = require('../streams')
|
||||||
* @typedef {(reqs: SimpleReceivedRequest[]) => void} Listener
|
* @typedef {(reqs: SimpleReceivedRequest[]) => void} Listener
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** @type {Set<Listener>} */
|
||||||
const listeners = new Set()
|
const listeners = new Set()
|
||||||
|
|
||||||
/** @type {SimpleReceivedRequest[]} */
|
/** @type {SimpleReceivedRequest[]} */
|
||||||
|
|
@ -30,16 +31,17 @@ const react = () => {
|
||||||
const pubToDn = Streams.getPubToDn()
|
const pubToDn = Streams.getPubToDn()
|
||||||
|
|
||||||
for (const [id, req] of Object.entries(currentNode)) {
|
for (const [id, req] of Object.entries(currentNode)) {
|
||||||
|
// HERE
|
||||||
const notAccepted = typeof pubToIncoming[req.from] === 'undefined'
|
const notAccepted = typeof pubToIncoming[req.from] === 'undefined'
|
||||||
|
|
||||||
if (notAccepted) {
|
if (notAccepted) {
|
||||||
if (typeof pubToAvatar[req.from] === 'undefined') {
|
if (typeof pubToAvatar[req.from] === 'undefined') {
|
||||||
// eslint-disable-next-line no-empty-function
|
// eslint-disable-next-line no-empty-function
|
||||||
Streams.onAvatar(() => {}, req.from)
|
Streams.onAvatar(() => {}, req.from)()
|
||||||
}
|
}
|
||||||
if (typeof pubToDn[req.from] === 'undefined') {
|
if (typeof pubToDn[req.from] === 'undefined') {
|
||||||
// eslint-disable-next-line no-empty-function
|
// eslint-disable-next-line no-empty-function
|
||||||
Streams.onDisplayName(() => {}, req.from)
|
Streams.onDisplayName(() => {}, req.from)()
|
||||||
}
|
}
|
||||||
|
|
||||||
finalReqs.push({
|
finalReqs.push({
|
||||||
|
|
@ -59,7 +61,6 @@ const react = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param {string} addr
|
* @param {string} addr
|
||||||
* @returns {(data: import('../SimpleGUN').OpenListenerData) => void}
|
* @returns {(data: import('../SimpleGUN').OpenListenerData) => void}
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue