diff --git a/src/xhrListener.ts b/src/xhrListener.ts index 39617e7..2322e98 100644 --- a/src/xhrListener.ts +++ b/src/xhrListener.ts @@ -79,10 +79,10 @@ class XhrListener { for (let client of c.clients) { let nonce: string = crypto.randomBytes(4).toString("hex"); // TODO: verify the nonce against the received reply, which we currently ignore - client.directMessage(JSON.stringify({ + client.directMessage({ message_type: "broadcast", message: { event_type: event, seq_id: nonce, examId: archMsg.examId } - })); + }); dmCount++; } // dmCount of 1 would be normal. more than 1 is odd, but not necessarily bad. 0 means Exam UI has gone away somehow.