return proper error for attempting to update m.room.create
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user