Remove context refrence from Contact struct

This will allow the Rust Context API to be refactored without breaking
the C API.  Full details in #476 aka
a0b5e32f98
This commit is contained in:
Floris Bruynooghe
2019-09-11 22:36:27 +02:00
committed by Floris Bruynooghe
parent 5ce27b16f1
commit aefddf7f5e
6 changed files with 58 additions and 65 deletions

View File

@@ -189,7 +189,7 @@ impl Chat {
let contacts = get_chat_contacts(context, self.id);
if !contacts.is_empty() {
if let Ok(contact) = Contact::get_by_id(context, contacts[0]) {
return contact.get_profile_image();
return contact.get_profile_image(context);
}
}
}
@@ -1365,7 +1365,7 @@ pub fn add_contact_to_chat_ex(
} else {
// else continue and send status mail
if chat.typ == Chattype::VerifiedGroup {
if contact.is_verified() != VerifiedStatus::BidirectVerified {
if contact.is_verified(context) != VerifiedStatus::BidirectVerified {
error!(
context,
"Only bidirectional verified contacts can be added to verified groups."