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

Bridge join via invite link to knock (Signal->Matrix), bridge ban/unban (Signal-> Matrix) #275

Merged
merged 2 commits into from
Dec 30, 2022

Conversation

maltee1
Copy link
Contributor

@maltee1 maltee1 commented Jun 22, 2022

Joining via invite link if the link policy is ADMINISTRATOR and the join_rule is knock will trigger a knock. The knock may then be accepted, which causes the signal user to be accepted into the group and join the matrix room.

  • I was unable to test rejecting knocks, because I don't have a client that supports rejecting knocks. I'm quite confident that the code is correct though.
  • requires add support for outgoing knocks python#105 (I see it was just merged)
  • this PR only really makes sense with Bridge join rules (both ways) #268, to ensure that link policy and join_rule match, but it shouldn't cause any issues if they don't. Join requests just won't work in that case.

One problem is that join requests are not pushed as a message on signal, but have to be fetched by the client. The signal app triggers a group update whenever the group is opened in the app, mautrix-signal only does so upon sync or if a message on the group comes in that has a new revision. I don't think there is a way to detect whether a user is looking at a particular room, in order to replicate the behavior on matrix. That means that unless the user runs sync by hand, join requests could be received much later than they were sent and there's most likely nothing we can do about it, other than having a PR accepted at signal. Thanks to @thefinn93 for figuring that out.

edit: I also added a small fix to the ban and unban mausignald functions. They only return GroupV2, because Group version 1 doesn't support bans.

@maltee1 maltee1 mentioned this pull request Jul 14, 2022
@maltee1 maltee1 force-pushed the invite_link_join branch 2 times, most recently from e083cb7 to 735ac18 Compare July 30, 2022 20:36
@tulir tulir merged commit ba64bc0 into mautrix:master Dec 30, 2022
@maltee1 maltee1 deleted the invite_link_join branch January 4, 2023 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants