return proper error for attempting to update m.room.create

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry committed 2024-12-15 14:23:13 -05:00
1 parent 468071336b
commit 2ba0400758
1 file changed
+5
+5
View File
@@ -207,6 +207,11 @@ async fn allowed_to_send_state_event(
json: &Raw<AnyStateEventContent>,
) -> Result {
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
| StateEventType::RoomEncryption =>
if !services.globals.allow_encryption() {