diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2017-12-11 11:02:37 -0500 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2017-12-11 11:02:37 -0500 |
| commit | 3933844069c347287c616bb4ebd896c96d280da1 (patch) | |
| tree | 5d09f6919afca09e673321be8a90c2f93f494867 | |
| parent | 57b02a05bb06817eaebe8fb8afd50be21c818157 (diff) | |
fixed onMessage data payload parsin
| -rw-r--r-- | www/js/EventServer.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/www/js/EventServer.js b/www/js/EventServer.js index 2eacf653..91fcd694 100644 --- a/www/js/EventServer.js +++ b/www/js/EventServer.js @@ -161,12 +161,11 @@ angular.module('zmApp.controllers') ws.onMessage (function (str) // ws.$on('$message', function(str) + { - if (str.isTrusted) { - NVRDataModel.log ("Got isTrusted="+str.isTrusted); - return; - } - NVRDataModel.log("Real-time event: " + JSON.stringify(str)); + str = JSON.parse(str.data); + //console.log ("FULL MESSAGE="+JSON.stringify(str.data)); + NVRDataModel.debug("Real-time event: " + JSON.stringify(str)); // Error messages if (str.status != 'Success') |
