diff --git a/websocket/websocket.cpp b/websocket/websocket.cpp index ea9b2a0..ec35cd7 100644 --- a/websocket/websocket.cpp +++ b/websocket/websocket.cpp @@ -99,9 +99,9 @@ void Websocket::sendData(data &d) {"hash", lastHash}, }; - { - if (webSocket != nullptr) { - webSocket->send(json.dump(), false); - } + if (webSocket != nullptr) { + std::ostringstream msg; + msg << "SEND:" << user << ":" << json.dump(); + webSocket->send(msg.str(), false); } } \ No newline at end of file