use custom_title in syslog

This commit is contained in:
2022-10-05 10:57:48 +08:00
parent 8fabca785c
commit e0d6720433
6 changed files with 32 additions and 30 deletions

View File

@@ -65,8 +65,8 @@ pub struct CurrentUser {
namehash: String,
is_admin: bool,
is_candidate: bool,
custom_title: String,
title_secret: String,
custom_title: Option<String>,
title_secret: Option<String>,
pub auto_block_rank: u8,
}
@@ -75,8 +75,7 @@ impl CurrentUser {
let (custom_title, title_secret) = CustomTitle::get(rconn, &namehash)
.await
.ok()
.flatten()
.unwrap_or_default();
.unwrap_or((None, None));
Self {
id: None,
is_admin: false,