streamRoomMessagesSubscribe method
void
streamRoomMessagesSubscribe(})
Implementation
void streamRoomMessagesSubscribe(WebSocketChannel webSocketChannel, Room room,
{required String token}) {
Map msg = {
"msg": "sub",
"id": room.id! + DateTime.now().millisecond.toString(),
"name": "stream-room-messages",
"params": [
room.id,
{"useCollection": false, "args": []}
]
};
logInfo('🚀🚀 streamRoomMessagesSubscribe $msg');
webSocketChannel.sink.add(jsonEncode(msg));
}