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.
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
MSC3266: Room summary API #3266
base: old_master
Are you sure you want to change the base?
MSC3266: Room summary API #3266
Changes from 36 commits
642f4e1
188b6e5
dc5b372
975ece5
d148acf
6776863
df376a3
43eecf0
66fee23
469b77b
04f807b
f1233c4
5fc2f5b
9e41b45
cab37e5
a93190f
8186b72
1a8ecff
82d8f3b
208a58c
33f3733
a5bc9ef
ac3d5da
dba6705
9719119
2ad832c
81fd904
57213f0
ed79007
284c181
e0d3a8b
938cbc0
424189c
c3558a6
491b77e
a03296e
56d995c
2f48c41
6aacb77
45fbfab
7299a8b
872c5de
76c0412
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? Wouldn't the server just go & get the latest data the same as it would if they weren't invited?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great question. @deepbluev7: can you shed any light here?
Looking at the synapse implementation, the logic goes:
join
, generate the summary locallyGET /_matrix/federation/v1/hierarchy/{roomId}
(or the local cache).I don't see any reason that rooms the user has been invited to or knocked at would be special here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no way to fetch a room summary over federation, that isn't publicly joinable and a user has been invited to. How would it fetch a more up to date state? That is not how invites currently work on Matrix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmhmm. So, in the current implementation: if you you have been invited to a remote room that isn't publicly joinable, /summary will return an 404 M_NOT_FOUND for that room, right?
Which I guess is kinda "outdated or partial information".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, because it's using the
/hierarchy
API over federation which doesn't allow fetching state of rooms you're not joined to? I hate to say it knowing you've already switched away from adding a federation part to the API, but possibly this would be a good reason to have one, then it could allow servers to view the summary if they had a user that had been invited. Potentially it could be left to a separate MSC but I'd certainly like if it were explained a lot better in the meantime.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarified in 7299a8b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allowed_room_ids
isn't mentioned in the format.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, which format?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean in the example above? Yes, because the
join_rule
is public. It is explained in the table below though, which also says that the field is optional. Does this need an example specifically with theroom_ids
, if the /hierarchy API already uses that field?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the JSON object above, yep, but the text says, "in the following format" rather than, "for example" so I was reading that as a canonical definition rather than an example. This might just be a case of misunderstanding and it just needs to be relabelled as an example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarified in 45fbfab.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the server doesn't know about the room, don't we return 04 as per the previous paragraph?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. It looks like the 404 paragraph was added in ed79007 (and later clarified in 424189c), but this
leave
requirement was forgotten.Looking at the Synapse implementation, it looks like it indeed returns a 404 if the server doesn't know about the room. I propose to remove this bit about
leave
.@deepbluev7: any objections?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is specifically about when the room info is fetched over federation. In those cases no membership information is available on the local server, but it can reasonably assume none of its local users are joined or invited. While that is obvious, I thought it deserved spelling this out explicitly, since servers shouldn't just omit the membership key in that case. It probably makes more sense to change
doesn't know about the room
tois not participating in the room
ordoes not have any local users in the room
or something about having had to fetch the summary over federation.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok well, let's change it to "It should be
leave
if the server does not have any local users in the room" if you think it's important to have something here, though IMHO it's clearer with nothing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully this is clarified by 45fbfab.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is really an alternative, or at least not one that needs 2 paragraphs of discussion. It's not a problem that it's here, but just as feedback for the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is mentioned as an alternative, because people brought up "just call sync" when I initially discussed this MSC with people. This section is an argument in that discussion. It obviously isn't a good alternative, but people needed that spelled out at the time and I didn't want to have this argument multiple times.