mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 15:26:30 +03:00
print profile-image in repl tool
This commit is contained in:
committed by
holger krekel
parent
021ad4f12c
commit
3cf39dace0
@@ -938,7 +938,14 @@ pub fn dc_cmdline(context: &Context, line: &str) -> Result<(), failure::Error> {
|
|||||||
let contact = Contact::get_by_id(context, contact_id)?;
|
let contact = Contact::get_by_id(context, contact_id)?;
|
||||||
let name_n_addr = contact.get_name_n_addr();
|
let name_n_addr = contact.get_name_n_addr();
|
||||||
|
|
||||||
let mut res = format!("Contact info for: {}:\n\n", name_n_addr);
|
let mut res = format!(
|
||||||
|
"Contact info for: {}:\nIcon: {}\n",
|
||||||
|
name_n_addr,
|
||||||
|
match contact.get_profile_image(context) {
|
||||||
|
Some(image) => image.to_str().unwrap().to_string(),
|
||||||
|
None => "NoIcon".to_string(),
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
res += &Contact::get_encrinfo(context, contact_id)?;
|
res += &Contact::get_encrinfo(context, contact_id)?;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user