@@ -65,35 +65,34 @@ export class WebSocketJs {
6565 // WsRequestsMsgsComponent onInit() is got the request id from url params
6666
6767 ref ( topic , calledby , onCreate , onUpdate , onData ) {
68- // this.logger.log('[WEBSOCKET-JS] ****** CALLING REF ****** ');
69- this . logger . log ( '[WEBSOCKET-JS] - REF - calledby ' , calledby ) ;
70- this . logger . log ( '[WEBSOCKET-JS] - REF - TOPIC ' , topic ) ;
71- this . logger . log ( '[WEBSOCKET-JS] - REF - CALLBACKS' , this . callbacks ) ;
68+ // this.logger.log('[WEBSOCKET-JS] - REF - calledby ', calledby);
69+ // this.logger.log('[WEBSOCKET-JS] - REF - TOPIC ', topic);
70+ // this.logger.log('[WEBSOCKET-JS] - REF - CALLBACKS', this.callbacks);
7271
7372 if ( ! this . callbacks ) {
7473 this . logger . log ( '[WEBSOCKET-JS] - REF OOOOPS! NOT CALLBACKS ***' , this . callbacks ) ;
7574 return
7675 }
7776
7877 this . callbacks . set ( topic , { onCreate : onCreate , onUpdate : onUpdate , onData : onData } ) ;
79- this . logger . log ( '[WEBSOCKET-JS] - CALLBACK-SET - callbacks' , this . callbacks ) ;
78+ // this.logger.log('[WEBSOCKET-JS] - CALLBACK-SET - callbacks', this.callbacks);
8079
8180 if ( this . ws && this . ws . readyState == 1 ) {
82- this . logger . log ( '[WEBSOCKET-JS] - REF - READY STATE ' , this . ws . readyState ) ;
83- this . logger . log ( '[WEBSOCKET-JS] - REF - READY STATE = 1 > SUBSCRIBE TO TOPICS ' ) ;
81+ // this.logger.log('[WEBSOCKET-JS] - REF - READY STATE ', this.ws.readyState);
82+ // this.logger.log('[WEBSOCKET-JS] - REF - READY STATE = 1 > SUBSCRIBE TO TOPICS ');
8483
8584 this . subscribe ( topic ) ;
8685
8786 } else {
8887 // this.ws = new WebSocket("wss://tiledesk-server-pre.herokuapp.com/?token=JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZGRkMzBiZmYwMTk1ZjAwMTdmNzJjNmQiLCJlbWFpbCI6InByZWdpbm9AZjIxdGVzdC5pdCIsImZpcnN0bmFtZSI6Ikdpbm8iLCJsYXN0bmFtZSI6IlByZSIsImVtYWlsdmVyaWZpZWQiOnRydWUsImlhdCI6MTYwODgwNjY0MCwiYXVkIjoiaHR0cHM6Ly90aWxlZGVzay5jb20iLCJpc3MiOiJodHRwczovL3RpbGVkZXNrLmNvbSIsInN1YiI6InVzZXIiLCJqdGkiOiI1YmVmMDcxYy00ODBlLTQzYzQtOTRhYS05ZjQxYzMyNDcxMGQifQ.wv6uBn2P6H9wGb5WCYQkpPEScMU9PB1pBUzFouhJk20");
8988
90- this . logger . log ( '[WEBSOCKET-JS] - REF - READY STATE ≠ 1 > OPEN WS AND THEN SUBSCRIBE TO TOPICS' ) ;
91- this . logger . log ( '% »»» WebSocketJs WF *** REF *** WS 2 ' , this . ws ) ;
89+ // this.logger.log('[WEBSOCKET-JS] - REF - READY STATE ≠ 1 > OPEN WS AND THEN SUBSCRIBE TO TOPICS');
90+ // this.logger.log('% »»» WebSocketJs WF *** REF *** WS 2 ', this.ws);
9291
9392 var that = this ;
9493 if ( this . ws ) {
9594 this . ws . addEventListener ( "open" , function ( event ) {
96- that . logger . log ( '[WEBSOCKET-JS] - REF - OPEN EVENT *** ' , event ) ;
95+ // that.logger.log('[WEBSOCKET-JS] - REF - OPEN EVENT *** ', event);
9796 that . subscribe ( topic ) ;
9897 } ) ;
9998 } else {
@@ -115,7 +114,7 @@ export class WebSocketJs {
115114 if ( this . topics . indexOf ( topic ) === - 1 ) {
116115 this . topics . push ( topic ) ;
117116 }
118- this . logger . log ( '[WEBSOCKET-JS] - SUBSCRIBE TO TOPIC ' , topic ) ;
117+ // this.logger.log('[WEBSOCKET-JS] - SUBSCRIBE TO TOPIC ', topic);
119118
120119 var message = {
121120 action : 'subscribe' ,
@@ -127,7 +126,7 @@ export class WebSocketJs {
127126 } ,
128127 } ;
129128 var str = JSON . stringify ( message ) ;
130- this . logger . log ( "[WEBSOCKET-JS] - SUBSCRIBE TO TOPIC - STRING TO SEND " + str , " FOR SUBSCRIBE TO TOPIC: " , topic ) ;
129+ // this.logger.log("[WEBSOCKET-JS] - SUBSCRIBE TO TOPIC - STRING TO SEND " + str, " FOR SUBSCRIBE TO TOPIC: ", topic);
131130
132131 this . send ( str , `SUBSCRIBE to ${ topic } ` ) ;
133132 }
0 commit comments