allow sending on multiple channels
This commit is contained in:
@@ -64,8 +64,11 @@ export function processMessage(ws: WS, messageString: string): void {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
guardStringNotEmpty(messageObject.messageChannel, (messageChannel) => {
|
guardStringNotEmpty(messageObject.messageChannel, (messageChannel) => {
|
||||||
if (!messageObject.messageBody) return;
|
const body = messageObject.messageBody;
|
||||||
sendMessage(messageChannel, messageObject.messageBody);
|
if (body == undefined) return;
|
||||||
|
|
||||||
|
const channels = messageChannel.split("/");
|
||||||
|
channels.forEach((channel) => sendMessage(channel, body));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user