Bridge join via invite link to knock (Signal->Matrix), bridge ban/unban (Signal-> Matrix) #275
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Joining via invite link if the link policy is
ADMINISTRATOR
and the join_rule isknock
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.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.