Writing a secure messenger application is difficult, and vulnerabilities have been found, and keep being found in all of them.
This requires far more than just a stream cipher such as Salsa20. An entire protocol has to be designed for user registration, key exchange, group invites and more.
The MLS working group is currently designing a reference protocol to do group messaging.
Meanwhile, Signal has opensourced their core library (https://github.com/signalapp/libsignal-protocol-c), and this is something you may want to look at.
Wire, another popular application with fairly decent security, has also opensourced most of its components: https://github.com/wireapp
But I wouldn't recommend starting from scratch, especially if you are new to cryptography.