|
|
@ -33,6 +33,9 @@ const handleMsg = async (msg, id) => {
|
|
|
|
event: `${channel}:read`,
|
|
|
|
event: `${channel}:read`,
|
|
|
|
data: await crud[channel].getAll(),
|
|
|
|
data: await crud[channel].getAll(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (channel === 'streams' && d.subscribe === 'streams:full') {
|
|
|
|
|
|
|
|
dm.data = await crud[channel].getAllPop()
|
|
|
|
|
|
|
|
}
|
|
|
|
connections[id].connection.send(JSON.stringify(dm))
|
|
|
|
connections[id].connection.send(JSON.stringify(dm))
|
|
|
|
} else if (d.hasOwnProperty('event') && channelEvents.indexOf(d.event) !== -1) {
|
|
|
|
} else if (d.hasOwnProperty('event') && channelEvents.indexOf(d.event) !== -1) {
|
|
|
|
const ev = d.event.split(':')
|
|
|
|
const ev = d.event.split(':')
|
|
|
|