matrix-spec-proposals
matrix-spec-proposals copied to clipboard
MSC3266: Room summary API
Somewhat related to MSC2946 this provides an API to get a summary for a specific room either from the local server or over federation.
Useful for a few cases, where you need to show a summary for a room like matrix.to, traveler bots, showing spaces, lightweight clients, etc.
~~Open design questions looking for feedback: see this comment chain: https://github.com/matrix-org/matrix-doc/pull/3266#discussion_r686213648~~ resolved as of 2021/10/06
Implementations:
- matrix.to: matrix-org/matrix.to#219
- Synapse: matrix-org/synapse#10394 (Only CS API) and matrix-org/synapse#11507 (for the federation bits)
- Element Android: https://github.com/vector-im/element-android/pull/3986
- Element Web (for member counts on space invites): https://github.com/matrix-org/matrix-react-sdk/pull/6982 and https://github.com/matrix-org/matrix-js-sdk/pull/1988
- Nheko (to have a prettier join room preview): https://github.com/Nheko-Reborn/nheko/commit/9d8d6b4bcaec0994776bf91a556a7e27cb862c30
Signed-off-by: Nicolas Werner [email protected]
idea reviewer: feedback on https://github.com/matrix-org/matrix-doc/pull/3266#discussion_r686213648 is specifically appreciated.
The author believes this MSC has all applicable implementations and is ready enough for FCP. It's not entirely clear what the next steps are for this one given the lack of SCT review, however the expectation is that someone will argue for it to be in a different status :)
The author believes this is ready for FCP.
@turt2live Element Android is using it also https://github.com/matrix-org/matrix-android-sdk2/blob/2627b3c7cb8350235269f47a239c46ed2ad512a4/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/RoomAPI.kt#L442-L452 https://github.com/vector-im/element-android/search?q=getRoomSummary
@t3chguy Thanks, I added that one to the PR summary! I tried to find it yesterday, but missed it :D
@deepbluev7 looks like Element Web is using it too. https://github.com/matrix-org/matrix-js-sdk/blob/9bf8b936d4b1312b5f24819c1cd3621d58ee4451/src/client.ts#L8925-L8937 https://github.com/matrix-org/matrix-react-sdk/blob/658ff4dfe6c93ca602060133054e45e859c6f32d/src/components/views/rooms/RoomInfoLine.tsx#L38
Added, thanks. Is only used for member counts on space invites it seems though, but I guess that's where this endpoint is useful. And easy way to get misc info on a random room in a uniform manner.
@turt2live given the provided links to client-side implementations, are you happy to waive your concerns? If not, could you be more specific about what you would want to see here?
Nheko now uses this in the join room dialog: https://github.com/Nheko-Reborn/nheko/commit/9d8d6b4bcaec0994776bf91a556a7e27cb862c30
An interesting future consumer of this work could be shields.io - https://github.com/badges/shields/blob/master/services/matrix/matrix.service.js currently registers a bunch of guests and uses the /state/
API so a dedicated API which doesn't require auth would be ideal.
Still lots of outstanding questions from previous reviews here. @deepbluev7 are you still interested in pursuing this?
Yeah, I am still pursuing this, but I need to update it to work with the new room join rule, since there knocking and restricted joins are not distinguishable, so the allowed roomids need to be exposed, possibly prefiltered. But since my clients now need the unstable endpoint anyway in a few released versions, I am not as much in a hurry anymore.
I'm going to take this off the SCT's priority list in that case. There is a bit of a problem if clients are relying on the unstable endpoint existing (as we're seeing happen outside of just your clients) - ideally, the MSC moves forward at a more hurried pace to avoid problems related to defacto spec.
For reference, how we'd likely avoid defacto spec being an issue here is recommend the feature for removal from Synapse, forcing clients to treat the functionality as unstable.
Well, the spec team told me to prioritize #3664, so that's what I did. Now that is stuck again. Before that, this MSC was stuck because there weren't enough implementations and half of the comments are nitpicking about wording or names, instead of actually being helpful to the content of the MSC, so it simply takes a bit of time to work on things. I changed some sentences 3 or more times. It simply takes a bit of time to please everyone with the wording, since if you react quickly, you end up just changing it back again on the next comment.
I think the 2 open points, that are actually important for the functionality of the MSC are:
- error codes
- No information about if you can join a restricted_knock room
The rest, in my opinion, is arguing about how specific things are worded or if a specific sentence "is important".
Also still not merged? We have a lot of users now complaining they can't see the rooms in the Matrix space. Most likely people are using Dendrite. Please consider making it out of beta this year...
@melroy89 Previewing rooms in a space is already part of the spec. This is for rooms outside the space hierarchy.
@melroy89 Previewing rooms in a space is already part of the spec. This is for rooms outside the space hierarchy.
Ah I see, since that still needs to be enabled manually in Dendrite? https://github.com/matrix-org/dendrite/blob/main/docs/FAQ.md#does-dendrite-support-space-summaries
That's because the devs didn't get around to stabilizing it and has little to do with the spec.
@deepbluev7 could you update the implementations list with MRS, please?
- issue: https://gitlab.com/etke.cc/mrs/api/-/issues/27
- commit: https://gitlab.com/etke.cc/mrs/api/-/commit/bc4a4a649cfbf98d850ea0248c78afc5d552e1be