unwrap mailinglist addr option in cffi

so rust api and jsonrpc return the option
This commit is contained in:
Simon Laux
2022-10-31 18:51:52 +01:00
committed by link2xt
parent 3150d2b94b
commit 1bd53de1f7
4 changed files with 6 additions and 6 deletions

View File

@@ -37,7 +37,7 @@ pub struct FullChat {
ephemeral_timer: u32, //TODO look if there are more important properties in newer core versions
can_send: bool,
was_seen_recently: bool,
mailing_list_address: String,
mailing_list_address: Option<String>,
}
impl FullChat {
@@ -81,7 +81,7 @@ impl FullChat {
false
};
let mailing_list_address = chat.get_mailinglist_addr().to_string();
let mailing_list_address = chat.get_mailinglist_addr().map(|s|s.to_string());
Ok(FullChat {
id: chat_id,