fix: ruma

This commit is contained in:
Timo Kösters 2021-07-15 19:54:04 +02:00
parent d07762f596
commit 0fcefa4125
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
8 changed files with 115 additions and 66 deletions

View file

@ -81,7 +81,7 @@ pub async fn get_pushrule_route(
.content
.get(body.rule_id.as_str())
.map(|rule| rule.clone().into()),
RuleKind::_Custom(_) => None,
_ => None,
};
if let Some(rule) = rule {
@ -181,7 +181,7 @@ pub async fn set_pushrule_route(
.into(),
);
}
RuleKind::_Custom(_) => {}
_ => {}
}
db.account_data.update(
@ -245,7 +245,7 @@ pub async fn get_pushrule_actions_route(
.content
.get(body.rule_id.as_str())
.map(|rule| rule.actions.clone()),
RuleKind::_Custom(_) => None,
_ => None,
};
db.flush().await?;
@ -314,7 +314,7 @@ pub async fn set_pushrule_actions_route(
global.content.replace(rule);
}
}
RuleKind::_Custom(_) => {}
_ => {}
};
db.account_data.update(
@ -383,7 +383,7 @@ pub async fn get_pushrule_enabled_route(
.iter()
.find(|rule| rule.rule_id == body.rule_id)
.map_or(false, |rule| rule.enabled),
RuleKind::_Custom(_) => false,
_ => false,
};
db.flush().await?;
@ -454,7 +454,7 @@ pub async fn set_pushrule_enabled_route(
global.content.insert(rule);
}
}
RuleKind::_Custom(_) => {}
_ => {}
}
db.account_data.update(
@ -523,7 +523,7 @@ pub async fn delete_pushrule_route(
global.content.remove(&rule);
}
}
RuleKind::_Custom(_) => {}
_ => {}
}
db.account_data.update(