I would bet my left hand that it’s possible, but is it feasible to use Matrix for the messaging? Or is this simply out the scope for the project?

Maya
admin
133M

So the protocol is way, way different and massively out of scope to actually reimplement, so it would never make sense to have chugging along within the Lemmy backend server itself.

However, embedding Matrix rooms in webpages is something the Matrix devs want to make more straightforward (Gitter does this nicely and they’re shooting to subsume all of its functionality) so it’s not too hard to imagine some kind of integration with a. a separate Matrix server that gives permissions to b. a Matrix bot to manage creation of new rooms c. UI extensions to show this alongside communities.

However!

Lemmy is deceptively shiny and awesome, but there’s still a lot of way more high-priority stuff that needs doing before this kind of huge feature extension is even discussed seriously, so the devs need to focus on that kind of thing.

Once the Element devs get embedded rooms a bit further down the road, this seems like a really doable project for a motivated Lemmy user to try adding on, though!

@SloppilyFloss
9
edit-2
3M

It would probably be possible to embed a Matrix client into a Lemmy instance by way of Hydrogen Web or https://cactus.chat, but automatically giving each Lemmy instance user their own Matrix account tied to their Lemmy account would be much harder and would require hosting an entire Matrix instance alongside Lemmy.

maybe thats not necessary, perhaps something like granting your matrix account acess to the lemmy website and then it would obly connect to the servers without the need of having to host an instance

the problem is Lemmy works on a different protocol. Matrix clients can’t handle ActivityPub data.

[deleted]
creator
13M

I was thinking more of a solution with cactus chat. I don’t know how much work it would be to tie that into a PM system but it would be cool to be able to message people on Matrix without leaving the site!

poVoq
73M

With XMPP this would be relatively easy by adding a project like ConverseJS or JSXC to lemmy-ui. Basically something that can be done right now with minimal code changes.

However maybe it would be interesting to add a simple addon system to Lemmy?

@Echedenyan
13M

Please, ConverseJS no. Anything but not that.

I have suffered the bad rendering and delays in many instances in last version in Firefox ESR and UXP-based browsers.

It is a complete nightmare.

@salarua@sopuli.xyz
6
edit-2
3M

already implemented. if you add your Matrix address in your user profile, other users will see a button to contact you via Matrix

[deleted]
creator
33M

This is just a link, I’m thinking about making a UI within Lemmy itself to chat using Matrix.

@kevincox
73M

To be frank I don’t see the advantage here. A project dedicated to making a good chat client will almost certianly make a better tool than lemmy trying to make a discussion form. It seems much better to keep the two features separate and let each project focus on itself.

i think that even if the developers had the time and resources to do that, they would consider it out of scope. there’s no reason alternative clients can’t do it though

@disrooter
-13M

I hope the opposite i.e. using Matrix protocol for federation instead of ActivityPub, this would solve a lot of problems with federation and enable chats like you wish.

[deleted]
creator
33M

What problems would this solve with federation? Seems like it would cut us off from sites like Mastodon

@disrooter
13M

Did you not realize that if your instance has not yet interacted with another and you want to see the profile of a user you will never see his old posts but you will only receive new ones if you click “follow”? Or the busted counters that are different depending on how your instance is connected to the others? Practically with ActivityPub the information hardly spreads, with Matrix you have the assured consistency.

And then the Access Control Lists, they are not supported by ActivityPub so no stuff like private groups. When it comes to Matrix,they are built-in.

And Matrix defines APIs for both server-to-server federation and client-server communication, while ActivityPub is currently only used for federation. Client-server ActivityPub APIs have been discarded in favor of thin-client APIs such as Mastodon’s.

Matrix continually adds new features. ActivityPub is stopped and too generic, it could be expanded in many ways for different use cases but each group of people works on it separately and for now without big results (see ForgeFed).

[deleted]
creator
23M

Lemmy’s goal is to be a link aggregator for the Fediverse, switching to the Matrix protocol would completely abandon that. Switching is simply out of question for the project as far as I know. Lemmy is also not even close to a finished product yet so current issues with federation are expected.

@disrooter
13M

I’m not talking about Lemmy, but the entire Fediverse. Matrix is not for instant messaging only, as its authors keep saying. Matrix is basically a decentralized database for real-time content with permissions and end-to-end encryption built-in. ActivityPub is good only for public content and can’t guarantee a modern user experience when it comes to federation, as I said as the network grows it adds inconsistencies and common users are confused by it.

@disrooter
13M

P.S. nothing stops someone from implementing both Matrix and ActivityPub on the same server: the former to federate with other Matrix servers and the latter to keep the federation with Mastodon & Co.

A loosely moderated place to ask open ended questions

If your post is

  1. Open ended
  2. Not offensive

it’s welcome here!

  • 0 users online
  • 12 users / day
  • 63 users / week
  • 136 users / month
  • 487 users / 6 months
  • 1561 subscribers
  • 445 Posts
  • 5523 Comments
  • Modlog