Skip to content
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

"Signal bridge bot changed the join rule to ask to join." #378

Open
cdauth opened this issue Oct 15, 2023 · 1 comment
Open

"Signal bridge bot changed the join rule to ask to join." #378

cdauth opened this issue Oct 15, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@cdauth
Copy link

cdauth commented Oct 15, 2023

I have a Matrix room that is bridged to a Signal group. I would like the Matrix room to be part of a space, with every space member being allowed to join the room.

I have successfully added the Matrix room to the space. I'm trying to configure the access rules in Element by going to the room settings, then "Security & Privacy" and there under "Access" selecting "Space members". After selecting the option, I can see the following messages in the chat:

[I] changed who can join this room. View settings.
Signal bridge bot changed the join rule to ask to join.

When I go to the group settings again, none of the "Access" options is selected. Space members can now see the room, but when they try to join it, they get the following error message:

MatrixError: [403] You are not invited to this room.

After some research, I found #268, which seems to adapt the Matrix room join rules to the settings of the Signal group. In its source code I found that it uses the public_portals config setting:

    # Whether or not to make portals of Signal groups in which joining via invite link does
    # not need to be approved by an administrator publicly joinable on Matrix.
    public_portals: false

However, enabling this setting does not seem to solve the problem for me.

After having a deeper look at the source code of #268 (in combination with the link access control for Signal groups and the join_rules for Matrix rooms), it looks like the current behaviour is this:

  • If the Signal group has a join link enabled without admin approval for new members:
    • if bridge.public_portals is true, the room is set to public
    • otherwise, the room is left untouched.
  • if the Signal group has a join link enabled with admin approval for new members, the room is set to "knock" (users can request to join)
  • otherwise, the room is set to invite only.

This means that the only way to achieve what I want would be to enable a join link for my Signal group. It seems that there is also some synchronization in the other direction that should enable the join link when I change the join rules for my Matrix room. However, first of all that seems to be buggy (for restricted Matrix rooms it sets the Signal group to ADMINISTRATOR, which in turn sets the Matrix room to invite), and second of all it does not help in my case because my bridge bot user is not a group admin.


It would be nice:

  • for Signal bridge bot to send a message what it changed the join rule to and why (similarly to how it sends a message confirming the set-relay command for example)
  • to allow restricted Matrix rooms for any kind of Signal group configuration
  • to have more control over the join rule synchronization behaviour through the config.
@cdauth cdauth added the enhancement New feature or request label Oct 15, 2023
@maltee1
Copy link
Contributor

maltee1 commented Apr 21, 2024

I suppose it would be fine to not overwrite a restricted join rule if the signal group allows join by invite link without admin approval, as well as knock_restricted if joining the signal group requires admin approval.

I also noticed that leave -> join membership isn't handled by mautrix-go. That (along with a corresponding function in mautrix-signal) is probably required for join_rule bridging to make sense for matrix -> signal room joins

I'm not sure why the bridge bot should send a notice when modifying the join rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants