prefer context.get_config() over context.sql.get_config() as the latter does not handle default values.

This commit is contained in:
B. Petersen
2019-10-03 16:53:23 +02:00
parent b4b8a1d15b
commit c6b2d640ae
8 changed files with 28 additions and 71 deletions

View File

@@ -82,10 +82,7 @@ pub fn dc_get_securejoin_qr(context: &Context, group_chat_id: u32) -> Option<Str
}
};
let self_name = context
.sql
.get_config(context, "displayname")
.unwrap_or_default();
let self_name = context.get_config(Config::Displayname).unwrap_or_default();
fingerprint = match get_self_fingerprint(context) {
Some(fp) => fp,