The PubNub entry raises an important chat question: what happens when a user opens a room that already has messages? PubNub's Chat SDK documents history retrieval separately from live subscriptions.
Test the moment a message arrives while the initial history is loading. Your interface should avoid showing it twice or dropping it between the historical and live views. Repeat after a temporary disconnection and define how ordering is resolved.
Use a short sequence of labelled test messages so gaps are visible.