sendMessage( )

The sendMessage API assists you to send a message on behalf of the logged in user to another user. The input parameter is user’s ID to whom the message is to be sent along with the message.

API:

The input parameter is user’s ID to whom the message wants to be sent along with the message.

jqcc.cometchat.sendMessage('id','message');

Sample:

<a href="javascript:void(0)" onclick="javascript:jqcc.cometchat.sendMessage('44','PING!!!');">Ping This User</a>

Not finding what you need?

The CometChat team is here to help!