New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matrix integration #311
Comments
This will do a lot to solve people's concerns over privacy! |
I think this makes a lot of sense. A lot of people want direct messages and Matrix seems like a great thing to explore. |
This comment is more speculative in nature than most of the ones I post in issue threads, but I think it goes here. As I'm reading more about Matrix the thought comes to mind that it might actually be a healthier federation platform than GNUSocial, overall. The difference is that while GS is application-centric(making the specific features of a social network decentralized) and has accumulated its technical lessons through the slings and arrows of outrageous fortune, Matrix has a more ground-up ambitious goal of being able to bridge to all sorts of protocols, including existing social networks, IRC, Telegram, XMPP, IOT systems, etc. It's a more generalized technology, and it enjoys commercial backing and the ecosystem benefits that come with that. A lot of the features we might want are receiving consideration there, too. What this means for Mastodon, architecturally speaking, is that one path the technology could take is to build towards a Matrix-centric implementation while retaining roots in this one through bridging. At that point, we enter an era with a potential diversity of social networks, each with their small quirks and variations, but all mostly accessible from one another. At the end of the day, as long as we have our federated network and the technical underpinnings are stable, the particulars don't matter. |
I thought I understood Matrix, but I don't. What's the practical next step for getting direct messaging to work in Mastodon? I thought Matrix was only a chat platform. Now I am intrigued, but I have even more questions than before. I don't think GNU Social supports direct messaging, so incorporating a solution will have to involve using a different piece of software that bridges with Mastodon. What would that software be, Matrix-based or not? |
Here is more information about Matrix. https://matrix.org/docs/guides/faq.html From my understanding, it is a chat platform. See "The difference between Matrix and XMPP." In theory XMPP can be used in a more general way too, but that doesn't mean it will be or should be. Matrix and XMPP just send plain text from one resource to another. Of course, that text could be on any format (JSON, YAML, Python source code, whatever), and you could rig up a system to handle messages however you want. I think the developers of Matrix just want you to know its theoretical potential whether it should be used that way is a different story. For Mastodon, I could see it handling the server-to-server communications since it stores a history of interactions. But maybe that's overkill when we can do the same thing using HTTP without much trouble. For a chat platform, though, it probably makes sense. |
I think this is rather out of scope for Mastodon. Integrated chat will always be worse than a program that is dedicated to chats; coupling Mastodon with one more technology will be a hit on maintainability and ease of self-hosting. I don't see myself investing time into a Matrix integration any time soon. Sorry. |
Cool, I agree it's out of scope for Mastodon, sort of. First the community needs to build a bridge between Matrix and Mastodon's local user profiles. If that works, it might make sense to allow server admins to enable some sort of generic UI element to guide people on how direct messaging works from within Mastodon. |
@Gargron, all: just to be clear - Matrix isn't a chat platform; it's just an open federated object database with realtime pubsub semantics. You could publish content from gnusocial or mastodon into it, or receive it for that matter. And yes, you could also use it for chat, or VoIP, or whatever other data sharing you needed. In return, you get bleeding edge E2E encryption and the ability to hook up to the whole Matrix ecosystem of clients, bots, bridges, integrations etc. I completely sympathise with the project itself not wanting to write an integration/bridge to Matrix, but I hope that someone from the mastodon community picks it up. (That said, i'm biased, given i work on Matrix :) |
@ara4n Thank you for chiming in! I'm still a bit unclear about how it all works, but it's getting slightly clearer. I stand corrected. I think the video on https://riot.im/ shows a good visualization of Matrix's goals. I'm excited about the potential, but having difficulty understanding all the capabilities. |
The simplest way of thinking of it is being like Git, but for realtime data. The animation at the bottom of https://matrix.org might be more illuminating. You basically do an HTTP PUT to a Matrix server with a blob of JSON; that server signs it into a Merkle DAG and PUTs it out to the other servers participating in the room. Other clients on the participating servers receive it (via long-lived HTTP GET or whatever), and the game continues. It's just an openly federated JSON db. Data integrity is maintained through the signatures in the Merkle DAG (and signatures on federation traffic) - and end-to-end encryption is provided by Olm (https://matrix.org/git/olm/about) - our own implementation of Signal's double ratchet. https://matrix.org/blog/2016/11/21/matrixs-olm-end-to-end-encryption-security-assessment-released-and-implemented-cross-platform-on-riot-at-last/ has painful amounts of detail about where we're at with E2E. |
Oh, and in terms of capabilities: right now we've defined schemas for room membership, IM and VoIP datatypes. Threaded messaging is on the horizon though, complete with bridges to stuff like SMTP, IMAP, NNTP, twitter, GNU Social etc. At which point it might become a bit more relevant to mastodon! |
@ara4n Thank you! This clear a lot up, especially the graph on the Matrix homepage, and understanding that data is sent in JSON. I also found this document which explains how "rooms" work, as well as all the other built-in Matrix objects. I'm wondering about the room concept in relation to Mastodon. All of Mastodon's events take place within a single "room". It seems like rooms can theoretically be used for anything. They could represent different database tables, or multiple channels of the same type of object (like IRC rooms). I'm not sure how this abstract concept can translate into bridging everything together in a meaningful way. Ideally a "room" would mean the same thing for every platform, right? |
So a 'room' in Matrix is analogous to an IRC channel - it's a place with a bunch of connected users (which may be human, bots, or whatever), a set of arbitrary key/value information (e.g. the name of the room), and a timeline of arbitrary conversation data. When bridging into something with twitter-style semantics, so far we've gone and created rooms to represent all the various 'views' of that world - e.g. a room per hashtag, a room per username, etc. Messages may end up getting duplicated across multiple rooms (e.g. if they have multiple hashtags or multiple mentions) but this isn't the end of the world. One of our GSoC projects this year was in fact building a twitter bridge with this sort of behaviour: https://half-shot.github.io/matrix-appservice-twitter. (Currently duplicated messages aren't factored out, but in future we plan to do this, much like git factors out duplicate content). Obviously there are many different ways to solve this problem though - and once threading lands in Matrix we may well see the ability for threads to span rooms, or rooms to be derived from sections of thread, or the so-called "multi-DAG" architecture where there's one set of global messages tied together into multiple different DAGs to create different rooms or views. But we're not there yet :) |
Thank you for clarifying! I'm very excited to see where Matrix goes. 😃 |
Since reading this post I have been using and experimenting with Matrix. It's fantastic. It is more than just a chat platform, but chat is currently its most widespread use case. The definitive Matrix server is called Synapse. If you set up Synapse on your server, people on Matrix can send you messages on a custom domain. I might be Just a thought, but it would be very very cool for Synapse and Mastodon to share user accounts. I'm not sure how to do that... both have robust APIs so maybe one could authenticate through the other? Or maybe they could both enable LDAP integration. I don't think there's any question that direct chatting with users is a very important part of a social network. With chat and microblogging together all we are missing is events to match Facebook's features. |
Just FYI, on disroot.org this is done with Matrix and Diaspora (one account to get e-mail address, diaspora account, Matrix one and other services). |
Don't show skins selector when there's only one (mastodon#256)
Sorry for posting in an old issue. I wrote matrix <=> mastodon bridge https://github.com/ma1uta/mxtoot where you can add a bot in the matrix which can toot messages, reply and boost statuses. |
Also borrow this old issue and share a tiny little self service tool to create Matrix account for Mastodon users with same id: https://github.com/freewizard/fediverse-matrix-keygen This is meant to be a lightweight stop-gap solution, before an official LDAP and/or OpenID in Mastodon, or support of AP acct as 3P ID in Matrix Identity Server. |
@ara4n this issue might have a higher relevance today because of the twitter acquisition happening right now. And the interesting activity happening on mastodon, as some interesting personalities (@janboehm@mastodon.social) are discovering it :) But https://github.com/ma1uta/mxtoot does not seems very active :) A good integration/bridging of both rising projects might the dream of interoperability coming true :) And with threads best time to get it right. You made integrated gitter in short time , you can do it with mastodon ;) Good Luck and fun :) |
@Gargron I'd like to hear your stance on this in 2022 (especially since you only commented once and that was when people thought that Matrix was about chat only). So is there potentially a road for Matrix and Mastodon to come closer together? |
It would be especially interesting of one of them attains the long-wished goal of having user accounts that are not tied to a specific instance/homeserver. |
There are Matrix clients now that mimic social networks. Just so you know. Several projects I've seen, including a Facebook-like. |
I see 2 important features here
|
@thecyberd3m0n very close but not exactly same as you described, I built a small tool to allow your Mastodon users to create Matrix accounts with same id: https://github.com/freewizard/fediverse-matrix-keygen |
As an alternative to direct messages and whatnot, let server admins hook your Mastodon profile into a Matrix server running locally, such that the Mastodon user
@LogicalDash@mastodon.social
is also the Matrix user@LogicalDash:mastodon.social
-- and/or, let the user link their own Matrix account on a different server with their Mastodon account.Then add user interface bits to make it easy to switch between the protocols...
The text was updated successfully, but these errors were encountered: