Skip to content

Commit db12008

Browse files
committed
changed to on message
1 parent a1247dc commit db12008

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ class Codebolt {
101101
utils = cbutils;
102102

103103
/**
104-
* Sets up a listener for incoming user messages with a direct handler function.
105-
* @param {Function} handler - The handler function to call when a user message is received.
104+
* Sets up a listener for incoming messages with a direct handler function.
105+
* @param {Function} handler - The handler function to call when a message is received.
106106
* @returns {void}
107107
*/
108-
onUserMessage(handler: (userMessage: any) => void | Promise<void> | any | Promise<any>) {
108+
onMessage(handler: (userMessage: any) => void | Promise<void> | any | Promise<any>) {
109109
const waitForConnection = () => {
110110
if (cbws.messageManager) {
111111
const handleUserMessage = async (response: any) => {

0 commit comments

Comments
 (0)