return proper error for attempting to update m.room.create
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
468071336b
commit
2ba0400758
1 changed files with 5 additions and 0 deletions
|
@ -207,6 +207,11 @@ async fn allowed_to_send_state_event(
|
||||||
json: &Raw<AnyStateEventContent>,
|
json: &Raw<AnyStateEventContent>,
|
||||||
) -> Result {
|
) -> Result {
|
||||||
match event_type {
|
match event_type {
|
||||||
|
| StateEventType::RoomCreate => {
|
||||||
|
return Err!(Request(BadJson(
|
||||||
|
"You cannot update m.room.create after a room has been created."
|
||||||
|
)));
|
||||||
|
},
|
||||||
// Forbid m.room.encryption if encryption is disabled
|
// Forbid m.room.encryption if encryption is disabled
|
||||||
| StateEventType::RoomEncryption =>
|
| StateEventType::RoomEncryption =>
|
||||||
if !services.globals.allow_encryption() {
|
if !services.globals.allow_encryption() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue