File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @codebolt/codeboltjs" ,
3- "version" : " 1.1.49 " ,
3+ "version" : " 1.1.50 " ,
44 "description" : " " ,
55 "keywords" : [],
66 "author" : " " ,
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class cbws {
2323 private getUniqueConnectionId ( ) : string {
2424 try {
2525 let fileContents = fs . readFileSync ( './codeboltagent.yml' , 'utf8' ) ;
26- let data :any = yaml . load ( fileContents ) ;
26+ let data : any = yaml . load ( fileContents ) ;
2727 return data . unique_connectionid ;
2828 } catch ( e ) {
2929 console . error ( 'Unable to locate codeboltagent.yml file.' ) ;
@@ -34,7 +34,7 @@ class cbws {
3434 private getInitialMessage ( ) : string {
3535 try {
3636 let fileContents = fs . readFileSync ( './codeboltagent.yml' , 'utf8' ) ;
37- let data :any = yaml . load ( fileContents ) ;
37+ let data : any = yaml . load ( fileContents ) ;
3838 return data . initial_message ;
3939 } catch ( e ) {
4040 console . error ( 'Unable to locate codeboltagent.yml file.' ) ;
@@ -57,7 +57,10 @@ class cbws {
5757 this . websocket . on ( 'open' , ( ) => {
5858 console . log ( 'WebSocket connected' ) ;
5959 if ( this . websocket ) {
60- this . websocket . send ( initialMessage ) ;
60+ this . websocket . send ( JSON . stringify ( {
61+ "type" : "sendMessage" ,
62+ "message" : initialMessage
63+ } ) ) ;
6164 resolve ( this . websocket ) ;
6265 }
6366 } ) ;
You can’t perform that action at this time.
0 commit comments