streamNotifyUserSubscribe method
Implementation
void streamNotifyUserSubscribe(WebSocketChannel webSocketChannel, User user) {
Map msg = {
"msg": "sub",
"id": user.id! + DateTime.now().millisecond.toString(),
"name": "stream-notify-user",
"params": [
user.id! + "/notification",
{
"useCollection": false,
"args": []
}
]
};
logInfo('🚀🚀 streamNotifyUserSubscribe $msg');
webSocketChannel.sink.add(jsonEncode(msg));
}