In October, 29 Tor Project has presented the Tor Messenger – client for popular IM-services like Facebook, Google, Twitter, XMMP and based on Instantbird. OTR (Off-The-Record) Messaging in XMPP-based services are default enabled. General idea of this new messenger – users can communicate with their usual serviсes via Tor tunnels and government or hackers can’t track their client-server routes and location.
Matrix – open source protocol for online communications: text chats, media: images, sounds; audio and video calls over WebRTC (browser-to-browser connections). Protocol was introduced in 2014 and now have some popularity. Matrix also support open HTTP APIs and work with messages in JSON format between server federations – a lot of servers with specified Matrix software. Guess your qestion – yes, you can also setup your personal server with Matrix.