I am developing a chat application like Facebook. In home page I am listing all the chat list, When opening a chat I am calling a REST API for getting new messages. Also, I implemented the push notification in my app. The push notification will receive when a new message comes.
The new messages listing REST API is called only when opening a chat. So how can I show the number of unread messages in a chat? Please suggest a suitable solution to show the unread message count? Is this feature possible using push notification?