Closed
Description
I'd like to allow calling broadcast(data)
, without sending the message to the sender.
Initially, I'm thinking of:
onMessage (client, message) {
const data = { hello: "world" };
// 1. passing "options" as second argument
this.broadcast(data, { except: client });
// 2. or having a "broadcastExcept" method,
// passing as reference the client that shouldn't receive it
this.broadcastExcept(data, client);
}
Which option would be best? Do you have another suggestion?
Thanks!