Matrix protocol for chat

I released the code on GitHub, but I would say this is alpha-level quality right now. A lot of things work, but the plugin is lacking documentation and there are some more patches (such as this one) required for Discourse to make it work.

What has been implemented so far:

  • Homeserver discovery – works :white_check_mark:
  • Channels – works :white_check_mark:
  • Group Chats – works :white_check_mark:
  • Direct Chats – works :white_check_mark:
  • Edits – works :white_check_mark:
  • Deletions – works :white_check_mark:
  • Uploads – scheduled next
  • Presence/typing notifications and read receipts – scheduled next (if possible)
  • Reactions – works :white_check_mark:
  • Replies – works :white_check_mark:
  • Text messages (plain and formatted, emojis) – works :white_check_mark:

There will be a more formal topic that announces the plugin when it reaches beta quality. Thank you for your interest in this plugin!

35 Likes

http://matrix.org/Element.io doesn’t exist anymore (although obviously http://element.io does).

1 Like

Great job, but this message will get lost here. You need to create a separate theme for this plugin

1 Like

What do you mean by theme? (Did you mean top type topic?)

1 Like

@volanar I think you missed the point of what Dan said:

He’s perfectly competent to start a new thread when he wants that level of exposure. :smiling_face:

5 Likes

Maybe a silly question, but with this integration, will it provide e2ee encryption on Discourse? Or would it be simply copying what’s on Discourse and pushing it to Matrix, so that an admin on Discourse would still have access to all of the plain-text messages sent in chats?

1 Like

This is super exciting. I noticed the linked pull request was completed, but no doubt it is a massive project. Curious about how Matrix chat support is going, and stoked for it.

8 Likes

It looks like this may have died but I wanted to respond to the thread and check in and let you all know there is at least one person still periodically checking in on this :slight_smile:

14 Likes

Could this please be broken out into it’s own plugin section so it is easier for others to find and discuss. Thanks for considering!

2 Likes

In my understanding, Discourse is mainly designed to be a public forum. E2E crypto is rather counter-productive in this regard. If you’re not trusting the admin of the Discourse instance, I see no point in using it at all. E2E crypto wouldn’t stop the admin to push malicious functionality into the browser to circumvent the crypto. If there’s a high requirement for secrecy for once-to-many or many-to-many communication, a dedicated Matrix channel is the best choice IMHO.

4 Likes

I agree. I guess I just imagine the vast majority of people who use the internet don’t fully comprehend that a private chat on a platform is very often viewable by an admin. In my case, as the admin, I’d probably just disable private chats on Discourse because I don’t know if people will understand that I can read all of their 1-1 messages despite how much I tell them I can and then maybe try to redirect people that if they want to reach out to people directly, to do so over Matrix or Signal (still waiting on usernames so one doesn’t have to give their phone number to everyone).

I appreciate the point that with open-source Discourse, the admin can just break the E2EE anyway so maybe couldn’t trust it regardless.

Thanks for replying~

Very cool, but I see there are no actual installation instructions listed.

More information about this plugin and how to install it on [Meta](https://meta.discourse.org/t/TODO).

You are confused. This bridges to Matrix, which means it does not include any sort of e2e encryption. It simply makes the forum chat available to matrix users as well.

This has nothing to do with secrecy. It is simply for chatting with people who happen to be on Matrix.

There is no e2e here. e2e would mean the encryption is on the client side, before it reaches the server. Can we please stop conflating matrix support with e2e.

For anyone who does want e2e in Discourse and wants to discuss somewhere else… you can use Discourse Encrypt (for Private Messages)

3 Likes

We could quite simply resolve this by including all of the administrators in each chat group participant list (and of course have it dynamically managed when and as administrators leave and join) but this would be a separate FR, of course.

1 Like

I don’t know if I’m reinventing the wheel, but I’m writing a bridge from Discourse Chat to other platforms. On Telegram, I’ve had pretty good success, and the bridging works really well. Next I am considering bridging Discourse Chat to Matrix.

7 Likes

Cool. You could take a look at the existing bridge that has been in development. Perhaps that is worth working on as well. GitHub - udan11/discourse-chat-matrix: A Matrix bridge for Discourse chat

4 Likes

A bit. This thread started with the idea of replacing the Discourse chat protocol with the Matrix protocol. Something which sounds very reasonable because it seems to be well designed and has growing adoption. I don’t even know why we’re talking about bridges here. The question is why or why not should the Discourse protocol deprecated in the future.

E2EE for private chats/messages (should be the same thing IMHO) would be possible by default with adoption of the Matrix protocol. No need for a custom protocol.

4 Likes

Can someone from the discourse core team give some info on the current state of discussions around “interoperability of discourse chat with matrix-based chat” ? Here in Europe, we have a number of big players that already use matrix as their technical base for their own messenger apps:

The adoption of matrix is growing world wide. I believe that some “linking” of the discourse chat with the matrix ecosystem may become a crucial argument for using the discourse platform in the near future (more or less similar to ActivityPub for linking Discourse with Mastodon). There is some bridge code at

but the last activity was 2 yrs ago. So, are there any plans to adopt this code or create something new which is “officially supported” ?

8 Likes

As great as ActivityPub is useful for linking open discussions, implementing matrix protocol could also be used as a secure way to link non-public categories between different discourse servers and also as an additional way of sending notifications to users.

3 Likes

NATO, too: https://www.reddit.com/r/nato/comments/18boysj/what_is_natos_act_innovation_hub_lab_capability/?utm_source=share&utm_medium=web2x&context=3

1 Like

There aren’t any concrete plans at this time.

We were working with Dan in those early explorations you see in that repository to learn more about the feasibility of making chat interoperable with matrix.

It did look promising at the time, though there were some challenges we surfaced that we didn’t get around to addressing fully – the main one being the way users on each system are handled.

Chat has also evolved a fair bit since then and we haven’t been treating matrix compatibility as a constraint on our designs, so it’s possible there are further divergences between the two systems that would need to be addressed.

It would likely take someone sponsoring this work to carry it forward and ensure there is a stronger incentive to maintain what is built.

7 Likes