Possibility to encrypt new rooms

Change-Id: Ie415a0f8ecec646510ac8f2f0adca58064e30da5
This commit is contained in:
Michael Albert 2020-05-25 09:32:47 +02:00
parent ab649fbf70
commit 07862591fd
4 changed files with 11 additions and 0 deletions

View File

@ -116,6 +116,7 @@ export const RoomCreate = props => (
placeholder="#"
/>
<BooleanInput source="public" label="synapseadmin.rooms.make_public" />
<BooleanInput source="encrypt" initialValue={true} label="synapseadmin.rooms.encrypt" />
</FormTab>
<FormTab
label="resources.rooms.fields.invite_members"

View File

@ -23,6 +23,7 @@ export default {
details: "Raumdetails",
room_name: "Raumname",
make_public: "Öffentlicher Raum",
encrypt: "Verschlüsselter Raum",
room_name_required: "Muss angegeben werden",
alias_required_if_public: "Muss für öffentliche Räume angegeben werden.",
alias: "Alias",

View File

@ -23,6 +23,7 @@ export default {
details: "Room Details",
room_name: "Room Name",
make_public: "Make room public",
encrypt: "Encrypt room",
room_name_required: "Must be provided",
alias_required_if_public: "Must be provided for a public room",
alias: "Alias",

View File

@ -56,6 +56,14 @@ const resourceMap = {
Array.isArray(data.invitees) && data.invitees.length > 0
? data.invitees
: undefined,
initial_state: data.encrypt ? [{
type: 'm.room.encryption',
state_key: '',
content: {
algorithm: 'm.megolm.v1.aes-sha2',
}
}] : undefined,
,
},
method: "POST",
})