-
Notifications
You must be signed in to change notification settings - Fork 382
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
MSC2923: Connect Matrix room to another Matrix room #2923
base: old_master
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,62 @@ | |||
# MSC0000: Matrix to Matrix connections |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be well up for figuring out a way (like this) to figure out how to replace plumbed bridged rooms with a generic "reversibly link this room to another matrix room" mechanism.
Currrently all bridges which support plumbing have to implement it separately, and hook up their own admin APIs for managing it, whereas in the end, the problem of saying "i have a community in #foo:matrix.org and a community in #foo_bar:gitter.im - please can i just sync their content, assuming the admins of both rooms are happy to do so" feels like it's a generic useful mechanism.
I haven't dug through the proposal in this MSC yet tho'.
(@MadLittleMods: MSC numbers aren't allocated, other than via GH - this one is 2923)
68561fd
to
60e8f5c
Compare
@@ -0,0 +1,62 @@ | |||
# MSC2923: Matrix to Matrix connections |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may go some way to solving decentralised bridges too. If each bridge maintains its own portal room, it can then be up to the bridges to negotiate on who bridges who.
|
||
## Proposal | ||
|
||
Add a mechanism to homeservers to be able connect and ferry messages back and forth from another Matrix room. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I'm going to put out thoughts here in different threads).
I'd like to avoid mixing messages between rooms at the DAG level, and this connection be a layer on top supported by the homeserver. Rooms would continue to be separate at that level, but the client would still see a room with messages mixed in from both rooms.
This however presents a problem in that it's difficult to splice together two different rooms as the DAG is used for ordering. You'd need some way to interject messages in a way that works. And then you can have things like replies/relationships which would be cross room, and would cause all sorts of headaches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This however presents a problem in that it's difficult to splice together two different rooms as the DAG is used for ordering. You'd need some way to interject messages in a way that works
Relates to #2716 and incrementally importing existing message history but we haven't come up with anything concrete there yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When someone sends a message to a room, we can also put a pointer reference event to the message in the connected room. This way we can follow the pointer to the single source of truth which may have edits, etc. This also makes it ordered in the DAG as expected for both rooms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added your potential solution (@Half-Shot) and the one I just mentioned to the MSC 👍
- Message pointer reference events
- Connection layer on top of the DAG
## Proposal | ||
|
||
Add a mechanism to homeservers to be able connect and ferry messages back and forth from another Matrix room. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If Alice joins room A, they would not see history until they join room B too? Would we need some kind of auto-join / auto-invite > join mechanism to avoid split brain views of the room?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Federated peeking 🤷
Re: #2923 (comment), if there are pointer reference events in the connected room, we can show a placeholder that you need to join the other room to see the message
## Proposal | ||
|
||
Add a mechanism to homeservers to be able connect and ferry messages back and forth from another Matrix room. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would power levels work in this instance? Presumably if a bridge has admin in it's portal room, it would not automatically get authority in the other room. This presents a problem in so far that if a IRC OP kicks/bans a Matrix user from the chat, how would the bridge handle that?
Would users be expected to op the bridge in the plumbed room, which would feel somewhat awkward and unexpected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If someone gets banned in a Matrix room, messages coming from the connected Matrix room would also be blocked. But I don't think the ban would necessarily carry through to the connected room by default.
Maybe we could add an option to "ban in connected rooms" as well which would only work if you were also authorized there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This relates to the PL(power-level/permission) syncing across rooms in a space from MSC1772 (see "room admin bot"), https://github.com/matrix-org/matrix-doc/pull/1772/files. We could probably re-use the same mechanism for syncing bans.
## Security considerations | ||
|
||
People might not realize their message is being shared more broadly to another audience. Also relating to a private room being connected to a public room. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'd need a two way negotiation system for this kind of linking, or the guys at #badroom:evilcorp.com
could easily bind themselves to #matrix:matrix.org
and cause hell.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to security consideration section 👍
|
||
This solution is flexible to solve any scenario but this functionality could also be built into the homeserver. | ||
|
||
This also requires more burden on people having to host their own bridge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As noted by @Half-Shot: Maintaining senders will be a problem if it's an AS bridge
|
||
This solution is flexible to solve any scenario but this functionality could also be built into the homeserver. | ||
|
||
This also requires more burden on people having to host their own bridge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also how does setting up the link/connection between rooms work for someone who doesn't own the homeserver
Also as alternative may be merging two separate rooms to one using Room Upgrades mechanism? |
And will be good to add "Rendered" link in MSC description to full description, like in most other MSC. |
Ow, this already proposed in:
But not yet available for users in Matrix clients. Will be good to have some command to merge two rooms into one, using |
|
||
#### Message pointer reference events | ||
|
||
When someone sends a message to a room, we also send a pointer reference event to the connected room which marks that messages place in the DAG. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Connect Matrix room to another Matrix room to effectively create a native Matrix to Matrix bridge.
Rendered
Todo