mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 06:26:30 +03:00
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:
committed by
holger krekel
parent
78030e4a31
commit
4e37610f21
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user