streamRoomMessagesUnsubscribe method

void streamRoomMessagesUnsubscribe(
  1. WebSocketChannel webSocketChannel,
  2. Room room
)

Implementation

void streamRoomMessagesUnsubscribe(
    WebSocketChannel webSocketChannel, Room room) {
  Map msg = {
    "msg": "unsub",
    "id": room.id! + "subscription-id",
  };
  webSocketChannel.sink.add(jsonEncode(msg));
}