Remove context ref from Chat struct

Leaving the C API untouched.  See #476 aka
a0b5e32f98 for more extensive rationale.
This commit is contained in:
Floris Bruynooghe
2019-09-11 19:04:29 +02:00
committed by Floris Bruynooghe
parent 649c2eb676
commit 8302d6833d
7 changed files with 99 additions and 109 deletions

View File

@@ -744,7 +744,7 @@ pub fn dc_msg_get_summary(context: &Context, msg: &mut Message, chat: Option<&Ch
let contact = if msg.from_id != DC_CONTACT_ID_SELF as libc::c_uint
&& ((*chat).typ == Chattype::Group || (*chat).typ == Chattype::VerifiedGroup)
{
Contact::get_by_id((*chat).context, msg.from_id).ok()
Contact::get_by_id(context, msg.from_id).ok()
} else {
None
};