by amiantos · 2y ago · 0 comments
While Discord might officially not allow it, a lot of folks do want the option of using different clients. There are a few out there and generally speaking it does like discord doesn't crack down on it unless they see odd api usage. *DISCLAIMER:* Still very much use at your own risk. I am not responsible for banned accounts.
> Why not make a great Matrix client or improve that ecosystem somehow otherwise?
Likely for the same reason there are still relatively few feature complete matrix clients out there. Don't get me wrong, there are a ton of clients out there with some functionality. But few that support all functionality. For the longest time it was just Element.
A large reason for that has to do with how complex the Matrix protocol is to deal with. To be fair, the discord API also has become a hot mess with all the features tagged on over the years. But the basic API for just chat is fairly straightforward. Not to mention that there are multiple wrapper libraries for various languages out there that make things even easier.
Also, people work on projects they benefit from themselves. Or at least the ones they are motivated to do. If someone isn't on Matrix why should they invest the time and effort to get effectively nothing in return?
Alternatives bring in their own set of issues and generally focus on technicalities rather than delivering a good Discord/etc competitor, so nobody uses them.
Do you want to chat with people or do you want to waste time dealing with protocol fragmentation, half-baked clients (or no clients at all), fundamental protocol-level flaws (that can't be fixed without effectively starting from scratch on a new protocol), etc? Most people pick the first option and then tolerate the badness of Discord as a necessary evil.
From my dabbling, I would say Discord's API is a lot easier and better documented. Matrix has a billion different standards, a complex message format, and encryption to deal with. There are libraries, but they're not easy to use, sometimes incomplete, and are rarely documented beyond "this is how you send a ping bot".
Also, people actually use Discord a lot. Matrix is big, but not Discord big. In practice, Discord rarely ever bans anyone for using alternative clients either.
I don't like the way Discord is now the standard for communities, but I'm not too surprised about it either. At least open source projects seem to use Matrix, but I wouldn't recommend it to my gaming buddies because of how odd the clients generally are.
There is one specification, available on the official site. It isn't, and never will be, required to implement all of it.
> a complex message format
It is a very simple format. Here's an example message (as sent by a client; additional fields are added by the server, such as server-side timestamp):
{
"content": {
"body": "Hello, world.",
"msgtype": "m.text"
},
"type": "m.room.message",
}
> and encryption to deal withThis is also optional. If you want to talk in unencrypted public rooms, for example, you needn't bother with it.
The spec is so simple that you can send a Matrix message from a shell with curl. It's just JSON over HTTP.
> This is also optional.
If you are making a client for anyone besides yourself at some point people will expect to be able to use one of the many "optional" features. At that point it doesn't matter if you technically don't need to support it as users will then simply see it as a shortcoming of your client.
So if we are talking about anything more than a MVP client these optional specs should be included in the argument as only being optional in theory.
> It is a very simple format.
In a best case scenario, sure. The Discord version of your example would just be "Hello, world" without any of the other JSON.
In practice, you need to deal with a whole range of message types with various references and slight variations. Inner Matrix message bodies are essentially freeform, which makes Matrix quite powerful but also difficult to deal with compared to the "different HTTP endpoint per request type" approach Discord takes.
> This is also optional. If you want to talk in unencrypted public rooms, for example, you needn't bother with it.
Sure, if you accept having your users install two different apps, one for encrypted chat and one for group chats.
You could say the same thing about any specification that involved multiple features.
> There may be one single reference, but it's constantly evolving.
So is HTML. But one of my Matrix clients from 7 years ago still works. How well would a 7-year-old Web browser work on today's Web? Could you use a 7-year-old version of a third-party Discord client?
> In a best case scenario, sure. The Discord version of your example would just be "Hello, world" without any of the other JSON.
So Discord encodes the message type in the URL instead of the body. So what? It has to go somewhere, and I'd generally rather have URLs include less, not more.
I actually messed up earlier: The `type` field is included in the event as seen after sending. The sent event could just be, e.g.
{
"content": {
"body": "Hello, world.",
"msgtype": "m.text"
}
}
I can't see anything to complain about there. (Sure, I'd prefer Lisp expressions over JSON, but come on.)> In practice, you need to deal with a whole range of message types with various references and slight variations.
Is the same not true for Discord? It supports a variety of message types as well, and Discord also constantly evolves the system and adds new features (every time I log on to it I'm bombarded with news of updates, yet I still can't find a way to view a simple list of "servers" I'm in by names instead of by unintelligible icons).
> In practice, you need to deal with a whole range of message types with various references and slight variations. Inner Matrix message bodies are essentially freeform, which makes Matrix quite powerful but also difficult to deal with compared to the "different HTTP endpoint per request type" approach Discord takes.
That seems to conflate two issues. And I don't see how it's more difficult to deal with than any key-value store in any program. You collect the values from the keys you care about. That's it. Every Matrix event has certain basic fields in common. A few are specific for message type (e.g. a filename field for a file or image upload event). Where's the problem? Destructuring incoming data is probably the easiest part of writing a messaging client.
> Sure, if you accept having your users install two different apps, one for encrypted chat and one for group chats.
I use unencrypted 1:1 chats as well (in which case it's no worse than IRC or Discord, where the server operator could read your messages).
I think that's pretty cool, frankly: that a modern system with well-audited end-to-end encryption still allows it to be used optionally. You're not required to deal with the complexity of key management and session verification if you don't need or want it. Matrix lets me choose.
And I can choose my homeserver or run my own. Can you run your own Discord server (actual server)?
The only significant appeal I see for Discord is the existing user base. Well, that didn't save AOL. I guess we'll see how it turns out.
Discord's hostility is irrelevant if you desire to write a client. Kind of like climbing a mountain because it's there; who cares if the mountain will probably kill you.
>I do wish people motivated to work on projects like this would dedicate that time elsewhere, somewhere they are wanted.
If that desire was expressed in the form of compensation, more devs would probably start lining up.
I realize the very concept of compensation is heresy for FOSS, though.
"Why make a Discord client when Discord literally does not want you to?" Why make another X when you could improve Y. Because most of the time if they wouldn't build X they wouldn't improve Y. This is no company that balance human resources.