|
|
@ -36,6 +36,7 @@ const recvUpdate = async (channel, data) => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const sendInitial = async (id) => {
|
|
|
|
const sendInitial = async (id) => {
|
|
|
|
|
|
|
|
if (id != null || id != '') {
|
|
|
|
const c = connections[id]
|
|
|
|
const c = connections[id]
|
|
|
|
const stream = await crud['streams'].getById(c.streamid)
|
|
|
|
const stream = await crud['streams'].getById(c.streamid)
|
|
|
|
c.connection.send(JSON.stringify({
|
|
|
|
c.connection.send(JSON.stringify({
|
|
|
@ -43,6 +44,7 @@ const sendInitial = async (id) => {
|
|
|
|
data: stream,
|
|
|
|
data: stream,
|
|
|
|
}))
|
|
|
|
}))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
module.exports = {
|
|
|
|
subscribe,
|
|
|
|
subscribe,
|
|
|
|