improvement: cache actual destination

This commit is contained in:
Timo Kösters 2020-12-06 11:05:51 +01:00
parent 45086b54b3
commit d62f17a91a
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
4 changed files with 74 additions and 35 deletions

View file

@ -136,6 +136,7 @@ fn setup_rocket() -> rocket::Rocket {
.attach(AdHoc::on_attach("Config", |rocket| async {
let data =
Database::load_or_create(rocket.figment().extract().expect("config is valid"))
.await
.expect("config is valid");
data.sending.start_handler(&data.globals, &data.rooms);