no moulinette ?

This commit is contained in:
Guillem George 2026-05-16 11:14:39 +02:00
parent a0b5e97058
commit 2b7b6b8684
5 changed files with 50 additions and 16 deletions

View file

@ -42,18 +42,26 @@ async function initSocket() {
return;
}
// TODO
async function subscribe(room) {
async function subscribe(room, channel) {
if (!room) {
room = "epi-place";
}
// console.warn("Skipping room susbscription (not implemented)")
if (!channel) {
channel = "message";
}
let path = "rooms.canvas.getStream";
if (channel.includes("chat") || channel.includes("message")) {
path = "rooms.getChat";
}
const msg = {
id: uuid,
method: "subscription",
params: {
path: "rooms.canvas.getStream" | "rooms.getChat",
path: path,
input: {
json: {
roomSlug: room,
@ -72,4 +80,4 @@ async function subscribe(room) {
// }
export { initSocket, socket };
export { socket, initSocket, subscribe };