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="#" placeholder="#"
/> />
<BooleanInput source="public" label="synapseadmin.rooms.make_public" /> <BooleanInput source="public" label="synapseadmin.rooms.make_public" />
<BooleanInput source="encrypt" initialValue={true} label="synapseadmin.rooms.encrypt" />
</FormTab> </FormTab>
<FormTab <FormTab
label="resources.rooms.fields.invite_members" label="resources.rooms.fields.invite_members"

View File

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

View File

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

View File

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