Hello.
I was trying to implement this code from github: GitHub - cometchat-pro-tutorials/react-customer-support-live-widget: Chat Widget Demo Using React Express + CometChat , but I’ve come across a problem.
Now, when I try to send a message inside of a box my console outputs this:
- code: “INVALID_RECEIVER_TYPE”
- details: “Please check the value of receiverType.”
- message: “Receiver type can be
user
orgroup
.” - name: “INVALID_RECEIVER_TYPE”
But the problem is that I’m using receiver type inside of my code.
Here is the textMessage: let textMessage = new CometChat.TextMessage(
agentUID,
newMessage,
CometChat.MESSAGE_TYPE.TEXT,
CometChat.RECEIVER_TYPE.USER
);
Now why I’m getting this error in my console? Is this outdated code, so that’s why it’s not working?