sendUserStatusEvent method

void sendUserStatusEvent(
  1. WebSocketChannel webSocketChannel,
  2. String roomId
)

Implementation

void sendUserStatusEvent(WebSocketChannel webSocketChannel, String roomId) {
  Map msg = {
    "msg": "sub",
    "id": roomId + "subscription-id",
    "name": "stream-notify-room",
    "params": ["$roomId/event"]
  };
  webSocketChannel.sink.add(jsonEncode(msg));
}