Do you think that it’s possible to build a web service to chat compatible with email , xmpp and matrix?
(and why not even with activityPub or rocketChat ?? )
Email is not chat (and there isn't a nice gateway for Deltachat AFAIK), otherwise yes that is possible. I run a modern IRC network that can be fully used with federated XMPP and Matrix accounts.
No, it's all automatic, but the core is IRCv3 so some knowledge of IRC is good to have for some more advanced features like channel registration and moderation.
But yes, you can create a channel though the Matrix portal and then share the link to it to IRC and XMPP users, just the syntax for these links is somewhat different for each protocol. Ideally, I could modify the XMPP invite portal (similar to matrix.to but easier to modify) to also work for Matrix and the IRC web-client, but so far they are separate.
I've wondered before now about an e-mail system which hosts the emails on one's own device, and uses the activity-pub protocol : decentralised email, I guess...
Though several apps that use the Tox protocol seem similar in function to regular instant messaging apps, the lack of central servers similar to XMPP or Matrix currently has the consequence that both parties of the chat need to be online for the message to be sent and received (https://en.wikipedia.org/wiki/Tox_(protocol)#Usability_as_an_instant_messenger )
That's why I think about using only decentralized protocol.
Both (decentralized and p2p) are usefull, but that not the same usage.
Briar have solved this by using a "mailbox", a small app installed on any android phone and just left at home. It acts as an always-online node that relays the messages to the reciever when they get online, or have the messages in a queue ready for when the senders contacts get online.
Yes... I guess if someone were to only use Tox, the device they were using it on would have to be on all the time, with one of the Tox clients running at least in the background.
Addendum
At least you know when the other person is online... There's some advantage to that.