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

Clarify that the event field of the send_join is only required when performing a restricted join #1834

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clarify that the `event` field of the `/v2/send_join` response is only required when `join_authorised_via_users_server` was present in the `content` field of the request.
6 changes: 3 additions & 3 deletions data/api/server-server/joins-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ paths:
title: SignedMembershipEvent
x-addedInMatrixVersion: "1.2"
description: |-
Required if the room version [supports restricted join rules](/rooms/#feature-matrix). The signed
copy of the membership event sent to other servers by the resident server, including the resident
server's signature.
Required if the `content` of the event in the request contained the `join_authorised_via_users_server`
field. The signed copy of the membership event sent to other servers by the resident server,
Comment on lines +210 to +211
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I've just written over at #1708: this doesn't seem to match Synapse's behaviour. AFAICT, the presence of join_authorised_via_users_server is not sufficient for Synapse to return a (signed) event here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does Synapse return the event if join_authorised_via_users_server is present and the room version supports restricted joins? Or what is it's behavior?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The synapse code is at https://github.com/element-hq/synapse/blob/v1.108.0/synapse/federation/federation_server.py#L952-L956.

Currently, it returns the event for all requests to /send_join. But it only signs the event if the user is actually performing a restricted join.

including the resident server's signature.
servers_in_room:
type: array
x-addedInMatrixVersion: "1.6"
Expand Down