mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-12 04:52:26 +01:00
Add a flag to /versions about SSS support (#17571)
So that clients can check for support. Note that if the feature is only enabled for some users, the `/versions` request must be authenticated to pick up that SSS is enabled for the user
This commit is contained in:
parent
fae75b0376
commit
9ce489be5e
2 changed files with 7 additions and 0 deletions
1
changelog.d/17571.misc
Normal file
1
changelog.d/17571.misc
Normal file
|
@ -0,0 +1 @@
|
|||
Add a flag to `/versions`, `org.matrix.simplified_msc3575`, to indicate whether experimental sliding sync support has been enabled.
|
|
@ -64,6 +64,7 @@ class VersionsRestServlet(RestServlet):
|
|||
|
||||
async def on_GET(self, request: SynapseRequest) -> Tuple[int, JsonDict]:
|
||||
msc3881_enabled = self.config.experimental.msc3881_enabled
|
||||
msc3575_enabled = self.config.experimental.msc3575_enabled
|
||||
|
||||
if self.auth.has_access_token(request):
|
||||
requester = await self.auth.get_user_by_req(
|
||||
|
@ -77,6 +78,9 @@ class VersionsRestServlet(RestServlet):
|
|||
msc3881_enabled = await self.store.is_feature_enabled(
|
||||
user_id, ExperimentalFeature.MSC3881
|
||||
)
|
||||
msc3575_enabled = await self.store.is_feature_enabled(
|
||||
user_id, ExperimentalFeature.MSC3575
|
||||
)
|
||||
|
||||
return (
|
||||
200,
|
||||
|
@ -169,6 +173,8 @@ class VersionsRestServlet(RestServlet):
|
|||
),
|
||||
# MSC4151: Report room API (Client-Server API)
|
||||
"org.matrix.msc4151": self.config.experimental.msc4151_enabled,
|
||||
# Simplified sliding sync
|
||||
"org.matrix.simplified_msc3575": msc3575_enabled,
|
||||
},
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue