Skip to content
Snippets Groups Projects
Unverified Commit c30cc612 authored by Timo Kösters's avatar Timo Kösters
Browse files

fix: send right errors on make/send join in restricted rooms

parent 2b7c1983
No related branches found
No related tags found
No related merge requests found
......@@ -1283,10 +1283,10 @@ pub async fn create_join_event_template_route(
if let Some(join_rules_event_content) = join_rules_event_content {
if matches!(
join_rules_event_content.join_rule,
JoinRule::Restricted { .. }
JoinRule::Restricted { .. } | JoinRule::KnockRestricted { .. }
) {
return Err(Error::BadRequest(
ErrorKind::Unknown,
ErrorKind::UnableToAuthorizeJoin,
"Conduit does not support restricted rooms yet.",
));
}
......@@ -1376,10 +1376,10 @@ async fn create_join_event(
if let Some(join_rules_event_content) = join_rules_event_content {
if matches!(
join_rules_event_content.join_rule,
JoinRule::Restricted { .. }
JoinRule::Restricted { .. } | JoinRule::KnockRestricted { .. }
) {
return Err(Error::BadRequest(
ErrorKind::Unknown,
ErrorKind::UnableToAuthorizeJoin,
"Conduit does not support restricted rooms yet.",
));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment