Interesting to note that WhatsApp started as a modified Mongoose IM.
Mongoose IM is a fork of ejabberd: - https://www.ejabberd.im/ - https://github.com/processone/ejabberd
Anyway Mongoose and eJabberd have an amazing lineage and track record of uses and forks :)
Facebook's chat system was built up with the same pattern: start with ejabberd, replace what you need to, eventually it's not the same at all (FB rewrote in C? because they couldn't hire Erlang people. WhatsApp rewrote in Erlang because Erlang is a very good fit for a chat app, and hired non-Erlang people and gave them Erlang books). I think RiotGames started with ejabberd as well.