fix boolean error in chatlist::get_msg_id()

the error led to unusable contact requests,
at least on android and ios (probably also desktop)
because msg_id=dc_chatlist_get_msg_id() always returns 0
and create_chat_by_msg_id(msg_id)
or dc_marknoticed_contact(<get sender from msg_id>)
failed therefore.
This commit is contained in:
B. Petersen
2019-10-31 12:06:38 +01:00
committed by holger krekel
parent 78030e4a31
commit 4e37610f21

View File

@@ -251,7 +251,7 @@ impl Chatlist {
///
/// To get the message object from the message ID, use dc_get_msg().
pub fn get_msg_id(&self, index: usize) -> Result<MsgId> {
ensure!(index >= self.ids.len(), "Chatlist index out of range");
ensure!(index < self.ids.len(), "Chatlist index out of range");
Ok(self.ids[index].1)
}