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 1
1
{
2
2
"name" : " @codebolt/codeboltjs" ,
3
- "version" : " 1.1.49 " ,
3
+ "version" : " 1.1.50 " ,
4
4
"description" : " " ,
5
5
"keywords" : [],
6
6
"author" : " " ,
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class cbws {
23
23
private getUniqueConnectionId ( ) : string {
24
24
try {
25
25
let fileContents = fs . readFileSync ( './codeboltagent.yml' , 'utf8' ) ;
26
- let data :any = yaml . load ( fileContents ) ;
26
+ let data : any = yaml . load ( fileContents ) ;
27
27
return data . unique_connectionid ;
28
28
} catch ( e ) {
29
29
console . error ( 'Unable to locate codeboltagent.yml file.' ) ;
@@ -34,7 +34,7 @@ class cbws {
34
34
private getInitialMessage ( ) : string {
35
35
try {
36
36
let fileContents = fs . readFileSync ( './codeboltagent.yml' , 'utf8' ) ;
37
- let data :any = yaml . load ( fileContents ) ;
37
+ let data : any = yaml . load ( fileContents ) ;
38
38
return data . initial_message ;
39
39
} catch ( e ) {
40
40
console . error ( 'Unable to locate codeboltagent.yml file.' ) ;
@@ -57,7 +57,10 @@ class cbws {
57
57
this . websocket . on ( 'open' , ( ) => {
58
58
console . log ( 'WebSocket connected' ) ;
59
59
if ( this . websocket ) {
60
- this . websocket . send ( initialMessage ) ;
60
+ this . websocket . send ( JSON . stringify ( {
61
+ "type" : "sendMessage" ,
62
+ "message" : initialMessage
63
+ } ) ) ;
61
64
resolve ( this . websocket ) ;
62
65
}
63
66
} ) ;
You can’t perform that action at this time.
0 commit comments