|
|
@ -34,6 +34,7 @@ const handleMsg = async (msg, id) => {
|
|
|
|
data: await crud[channel].getAll(),
|
|
|
|
data: await crud[channel].getAll(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (channel === 'streams' && d.subscribe === 'streams:full') {
|
|
|
|
if (channel === 'streams' && d.subscribe === 'streams:full') {
|
|
|
|
|
|
|
|
dm.event = 'streams:full'
|
|
|
|
dm.data = await crud[channel].getAllPop()
|
|
|
|
dm.data = await crud[channel].getAllPop()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
connections[id].connection.send(JSON.stringify(dm))
|
|
|
|
connections[id].connection.send(JSON.stringify(dm))
|
|
|
@ -75,6 +76,12 @@ const fanoutMsg = (channel, data) => {
|
|
|
|
data,
|
|
|
|
data,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
connections[k].connection.send(JSON.stringify(d))
|
|
|
|
connections[k].connection.send(JSON.stringify(d))
|
|
|
|
|
|
|
|
} else if (connections[k].events.indexOf(`streams:full`) !== -1) {
|
|
|
|
|
|
|
|
const d = {
|
|
|
|
|
|
|
|
event: `streams:full`,
|
|
|
|
|
|
|
|
data,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
connections[k].connection.send(JSON.stringify(d))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|