fix: send right errors on make/send join in restricted rooms
This commit is contained in:
parent
2b7c19835b
commit
c30cc6120b
1 changed files with 4 additions and 4 deletions
|
@ -1283,10 +1283,10 @@ pub async fn create_join_event_template_route(
|
||||||
if let Some(join_rules_event_content) = join_rules_event_content {
|
if let Some(join_rules_event_content) = join_rules_event_content {
|
||||||
if matches!(
|
if matches!(
|
||||||
join_rules_event_content.join_rule,
|
join_rules_event_content.join_rule,
|
||||||
JoinRule::Restricted { .. }
|
JoinRule::Restricted { .. } | JoinRule::KnockRestricted { .. }
|
||||||
) {
|
) {
|
||||||
return Err(Error::BadRequest(
|
return Err(Error::BadRequest(
|
||||||
ErrorKind::Unknown,
|
ErrorKind::UnableToAuthorizeJoin,
|
||||||
"Conduit does not support restricted rooms yet.",
|
"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 let Some(join_rules_event_content) = join_rules_event_content {
|
||||||
if matches!(
|
if matches!(
|
||||||
join_rules_event_content.join_rule,
|
join_rules_event_content.join_rule,
|
||||||
JoinRule::Restricted { .. }
|
JoinRule::Restricted { .. } | JoinRule::KnockRestricted { .. }
|
||||||
) {
|
) {
|
||||||
return Err(Error::BadRequest(
|
return Err(Error::BadRequest(
|
||||||
ErrorKind::Unknown,
|
ErrorKind::UnableToAuthorizeJoin,
|
||||||
"Conduit does not support restricted rooms yet.",
|
"Conduit does not support restricted rooms yet.",
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue