OpenVidu provides the concept of session and a user can join to any session controlled by tokens. So yes, you could implement a whatsapp like application with OpenVidu.
But there are some limitations with OpenVidu for this kind of application:
- OpenVidu is optimized is such a way so a user can only be connected to a session at a time. In whatsapp you are connected to multiple conversations at the same time.
- WebSocket is used to maintain the connection with the session, so no notifications (mobile or in browser) when the user is not connected.
- You have to persist the messages exchanged on your own application. OpenVidu just distribute the messages, but not persist them to send them to a non connected user when it connects again.
It is better idea to implement the chat with other library or technology and use OpenVidu just when participants want to have a audio/video conversation.