The French government has adopted Riot for official instant messaging. It's federated (like email), offers end-to-end encryption, has what appear to be mature mobile clients and is open source. While the Mattermost freemium model lacks street cred, and XMPP/Jabber is on the decline, Riot, based on the Matrix protocol looks like an interesting option for a self-hosted instant messaging system.

Tchap