Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
9db4c1b1
Unverified
Commit
9db4c1b1
authored
4 years ago
by
Patrick Cloke
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add flags to /versions about whether new rooms are encrypted by default. (#8343)
parent
14b5b48a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/8343.feature
+1
-0
1 addition, 0 deletions
changelog.d/8343.feature
synapse/rest/client/versions.py
+19
-0
19 additions, 0 deletions
synapse/rest/client/versions.py
with
20 additions
and
0 deletions
changelog.d/8343.feature
0 → 100644
+
1
−
0
View file @
9db4c1b1
Add
flags
to
the
`/versions`
endpoint
that
includes
whether
new
rooms
default
to
using
E2EE.
This diff is collapsed.
Click to expand it.
synapse/rest/client/versions.py
+
19
−
0
View file @
9db4c1b1
...
...
@@ -19,6 +19,7 @@
import
logging
import
re
from
synapse.api.constants
import
RoomCreationPreset
from
synapse.http.servlet
import
RestServlet
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -31,6 +32,20 @@ class VersionsRestServlet(RestServlet):
super
(
VersionsRestServlet
,
self
).
__init__
()
self
.
config
=
hs
.
config
# Calculate these once since they shouldn't change after start-up.
self
.
e2ee_forced_public
=
(
RoomCreationPreset
.
PUBLIC_CHAT
in
self
.
config
.
encryption_enabled_by_default_for_room_presets
)
self
.
e2ee_forced_private
=
(
RoomCreationPreset
.
PRIVATE_CHAT
in
self
.
config
.
encryption_enabled_by_default_for_room_presets
)
self
.
e2ee_forced_trusted_private
=
(
RoomCreationPreset
.
TRUSTED_PRIVATE_CHAT
in
self
.
config
.
encryption_enabled_by_default_for_room_presets
)
def
on_GET
(
self
,
request
):
return
(
200
,
...
...
@@ -62,6 +77,10 @@ class VersionsRestServlet(RestServlet):
"
org.matrix.msc2432
"
:
True
,
# Implements additional endpoints as described in MSC2666
"
uk.half-shot.msc2666
"
:
True
,
# Whether new rooms will be set to encrypted or not (based on presets).
"
io.element.e2ee_forced.public
"
:
self
.
e2ee_forced_public
,
"
io.element.e2ee_forced.private
"
:
self
.
e2ee_forced_private
,
"
io.element.e2ee_forced.trusted_private
"
:
self
.
e2ee_forced_trusted_private
,
},
},
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment