socket.on('_loadRecentChatCb', async (params, callback) => { group_type : single || group, ( if group chat add group else single) }); socket.on("_loadChatHistoryWithCb", async (params, callback) => { chat_room_id: }); socket.on('_sendMessageWithCb', async (params, callback) => { "message": "hi alex", "sender_id": "78", "message_type": "text", if(singl chat ){ "target_id" : user id }else { "ref_module_id": "30", (event_id ) } "chat_room_id": "0", (chat room id if no room exist chat room id will be 0) "group_type": "group" (if group chat group then single) }}); socket.on("_joinRoomWithCb", async (params, callback) => { chat_room_id }); socket.on("_isRoomMemberWithCb", async (params, callback) => { chat_room_id : (room id) } Listners: _receivedMessage socket.on('_getRoomIdWithCb', async (params: any, callback: any) => { chat_room_id:0, target_id: receiver user Id , }