Skip to content
Snippets Groups Projects
Commit 1325113a authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-1939: minor tweak

parent 463e2ac9
No related branches found
No related tags found
1 merge request!955TMSS-1939
...@@ -139,8 +139,10 @@ class TMSSEventMessageHandlerForWebsocket(TMSSEventMessageHandler): ...@@ -139,8 +139,10 @@ class TMSSEventMessageHandlerForWebsocket(TMSSEventMessageHandler):
def _broadcast_notify_to_clients_websocket(self, msg, clients): def _broadcast_notify_to_clients_websocket(self, msg, clients):
# Send a broadcast message to all ws clients passed as argument # Send a broadcast message to all ws clients passed as argument
json_msg = JSONdumps(msg) # Stringify msg, so clients can parse it as JSON
logger.debug("Sending json on websocket to %d clients: %s", len(clients), json_msg)
for ws in clients: for ws in clients:
ws.sendMessage(JSONdumps(msg)) # Stringify msg, so clients can parse it as JSON ws.sendMessage(json_msg)
def _post_update_on_websocket(self, pk, object_type, action): def _post_update_on_websocket(self, pk, object_type, action):
# Get WS clients authorised to get object changes information # Get WS clients authorised to get object changes information
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment