this post was submitted on 30 Mar 2021
13 points (88.2% liked)

Asklemmy

44824 readers
1025 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_[email protected]~

founded 5 years ago
MODERATORS
 

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?

top 17 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 13 points 3 years ago

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!

[โ€“] [email protected] 9 points 3 years ago* (last edited 3 years ago) (2 children)

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.

[โ€“] [email protected] 4 points 3 years ago (1 children)

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

[โ€“] [email protected] 5 points 3 years ago

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

[โ€“] [email protected] 1 points 3 years ago

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!

[โ€“] [email protected] 7 points 3 years ago (1 children)

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?

[โ€“] [email protected] 1 points 3 years ago

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.

[โ€“] [email protected] 6 points 3 years ago* (last edited 3 years ago) (1 children)

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

[โ€“] [email protected] 3 points 3 years ago (2 children)

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

[โ€“] [email protected] 7 points 3 years ago

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.

[โ€“] [email protected] 6 points 3 years ago

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

[โ€“] [email protected] -1 points 3 years ago (1 children)

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.

[โ€“] [email protected] 3 points 3 years ago (1 children)

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

[โ€“] [email protected] 1 points 3 years ago (2 children)

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).

[โ€“] [email protected] 2 points 3 years ago (1 children)

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.

[โ€“] [email protected] 1 points 3 years ago

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.

[โ€“] [email protected] 1 points 3 years ago

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.