Progress with DMs

Progress with DMs
This commit is contained in:
mgabdev
2020-12-03 17:13:11 -05:00
parent a129b3ce3b
commit 137a36b810
53 changed files with 539 additions and 182 deletions

View File

@@ -537,8 +537,7 @@ const startWorker = (workerId) => {
});
app.get('/api/v1/streaming/chat_messages', (req, res) => {
console.log("tilly hello from inside here:", req)
const channel = `chat_messages:${req.chatConversationId}`;
const channel = `chat_messages:1`;
streamFrom(channel, req, streamToHttp(req, res), streamHttpEnd(req, subscriptionHeartbeat(channel)));
});
@@ -551,8 +550,6 @@ const startWorker = (workerId) => {
let channel;
console.log("tilly location.query.stream:", location.query.stream)
switch (location.query.stream) {
case 'statuscard':
channel = `statuscard:${req.accountId}`;
@@ -566,8 +563,7 @@ const startWorker = (workerId) => {
streamFrom(`timeline:${req.accountId}`, req, streamToWs(req, ws), streamWsEnd(req, ws), false, true);
break;
case 'chat_messages':
console.log("tilly incoming chat_messages:", req.chatConversationId, location.query.stream)
streamFrom(`chat_messages:${req.chatConversationId}`, req, streamToWs(req, ws), streamWsEnd(req, ws), false, true);
streamFrom(`chat_messages:${req.accountId}`, req, streamToWs(req, ws), streamWsEnd(req, ws), false, true);
break;
default:
ws.close();