mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-21 03:42:55 +03:00
Server-enforced e2e for private rooms
This commit is contained in:
parent
d18731e252
commit
fd28d13e19
1 changed files with 11 additions and 0 deletions
|
@ -46,12 +46,14 @@ class RoomCreationHandler(BaseHandler):
|
|||
"history_visibility": "shared",
|
||||
"original_invitees_have_ops": False,
|
||||
"guest_can_join": True,
|
||||
"encryption_alg": "m.megolm.v1.aes-sha2",
|
||||
},
|
||||
RoomCreationPreset.TRUSTED_PRIVATE_CHAT: {
|
||||
"join_rules": JoinRules.INVITE,
|
||||
"history_visibility": "shared",
|
||||
"original_invitees_have_ops": True,
|
||||
"guest_can_join": True,
|
||||
"encryption_alg": "m.megolm.v1.aes-sha2",
|
||||
},
|
||||
RoomCreationPreset.PUBLIC_CHAT: {
|
||||
"join_rules": JoinRules.PUBLIC,
|
||||
|
@ -373,6 +375,15 @@ class RoomCreationHandler(BaseHandler):
|
|||
content=content,
|
||||
)
|
||||
|
||||
if "encryption_alg" in config:
|
||||
send(
|
||||
etype="m.room.encryption",
|
||||
state_key="",
|
||||
content={
|
||||
'algorithm': config["encryption_alg"],
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
class RoomContextHandler(BaseHandler):
|
||||
@defer.inlineCallbacks
|
||||
|
|
Loading…
Reference in a new issue