Skip to content

Commit

Permalink
fix: give feedback on subscribe_all connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien committed Jan 10, 2025
1 parent a158950 commit acae869
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,15 @@ app.ws("/streaming/", (ws /*, req*/) => {
if (js.msg_type == "data:subscribe_oauth" || js.msg_type == "data:subscribe_all") {
console.log("Subscribe from: %s", js.tag);
tags[js.tag] = ws;
let msg = "control:hello";
if (js.msg_type == "data:subscribe_all") {
tagsRaw[js.tag] = true;
msg = "control:hello:" + js.tag;
}

ws.send(
JSON.stringify({
msg_type: "control:hello",
msg_type: msg,
connection_timeout: 30000,
}),
);
Expand Down

0 comments on commit acae869

Please sign in to comment.