When I started to implement my first chat application, I really didn't have a clue what the database structure should look like. Despite making several changes over the years, the basic message and recent item structure remained the same. Although the original structure caused several issues, which became more and more annoying.
With version 3.1, these database-related issues have now been solved. We don't store recent items on Firebase anymore. The conversation-related information is generated and stored only locally. Also, all users now have their own message paths. So everybody can control their own messages without touching those of other users.
Several UI changes have also been performed along with a few bug fixes. Please check the latest implementation and let me know what you think. :)