Skip to content

Conversation

@zecakeh
Copy link
Contributor

@zecakeh zecakeh commented Jan 13, 2025

GET /_matrix/client/v3/thirdparty/protocols and GET /_matrix/client/v3/thirdparty/protocol/{protocol} currently return an undocumented field instance_id for each returned Protocol Instance.

The value of this field can be used as a parameter to POST /_matrix/client/v3/publicRooms.

instance_id has always been present since before the thirdparty protocol endpoints were added to the spec:

I marked it as required because that is how it is defined in the TypeScript definition of the type in matrix-js-sdk, and according to the corresponding code in Synapse it is defined if network_id is defined, and according to the spec the latter is required. No longer marked as required: this would be a breaking change.

Fixes #833: The first paragraph of #833 seems to have been handled already, but this is about the second paragraph that is still relevant.

Pull Request Checklist

Preview: https://pr2051--matrix-spec-previews.netlify.app

It is used as the `third_party_instance_id` of `POST /_matrix/client/v3/publicRooms`.

It has always been present since before the thirdparty protocol endpoints were added to the spec.

Signed-off-by: Kévin Commaille <[email protected]>
@zecakeh zecakeh requested a review from a team as a code owner January 13, 2025 11:47
Signed-off-by: Kévin Commaille <[email protected]>
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

thanks for looking into this!

Signed-off-by: Kévin Commaille <[email protected]>
Signed-off-by: Kévin Commaille <[email protected]>
Signed-off-by: Kévin Commaille <[email protected]>
@zecakeh zecakeh requested a review from richvdh February 11, 2025 19:34
@richvdh
Copy link
Member

richvdh commented Feb 13, 2025

I'll take a closer look later, but I wanted to record:

I spoke to the SCT about this, and there was a suggestion that an interesting alternative would be to remove this feature from the spec altogether (i.e., at least remove third_party_instance_id from /publicRooms).

Element-Web does have support for instance_id/third_party_instance_id, but it doesn't seem to work very well. Particularly: GET /_matrix/client/v3/thirdparty/protocols does not, and has never worked, over federation; in addition, matrix.org now has very few bridges and it's unclear that the support is actually useful.

Obviously, such a change would require an MSC, along with research into whether any other parts of the protocol are also obsolete, so I'm not particularly suggesting anyone do that work immediately. But if anyone were interested in working in this area at any point, that would be nice.

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

Thanks!

@richvdh richvdh changed the title Document the instance_id field of Protocol Instance in the CS API Document instance_id field of /thirdparty/protocols Feb 13, 2025
@richvdh richvdh merged commit c2ef38f into matrix-org:main Feb 13, 2025
12 checks passed
@zecakeh zecakeh deleted the thirdparty-protocol-instance_id branch February 13, 2025 21:27
@Johennes Johennes mentioned this pull request Jul 2, 2025
30 tasks
KitsuneRal added a commit to quotient-im/matrix-spec that referenced this pull request Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

publicRooms and thirdparty protocols lack in documentation

2 participants