Skip to content

Commit 74a1225

Browse files
changes
1 parent 13c4b45 commit 74a1225

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codebolt/codeboltjs",
3-
"version": "1.1.46",
3+
"version": "1.1.47",
44
"description": "",
55
"keywords": [],
66
"author": "",

src/modules/chat.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,19 @@ const cbchat = {
150150
}
151151
});
152152
});
153-
}
153+
},
154+
/**
155+
* Sends a notification event to the server.
156+
* @param {string} notificationMessage - The message to be sent in the notification.
157+
*/
158+
sendNotificationEvent: (notificationMessage: string, type: 'debug' | 'git' | 'planner' | 'browser' | 'editor' | 'terminal' | 'preview'): void => {
159+
cbws.getWebsocket.send(JSON.stringify({
160+
"type": "notificationEvent",
161+
"message": notificationMessage,
162+
"eventType":type
163+
}));
164+
},
165+
154166
};
155167

156168
export default cbchat;

0 commit comments

Comments
 (0)