diff --git a/src/chatlist.rs b/src/chatlist.rs index 901e0b35b..018aff4ab 100644 --- a/src/chatlist.rs +++ b/src/chatlist.rs @@ -291,7 +291,7 @@ impl<'a> Chatlist<'a> { if (*chat).id == DC_CHAT_ID_ARCHIVED_LINK as u32 { (*ret).text2 = dc_strdup(0 as *const libc::c_char) - } else if lastmsg.is_null() || (*lastmsg).from_id == DC_CONTACT_ID_SELF as u32 { + } else if lastmsg.is_null() || (*lastmsg).from_id == DC_CONTACT_ID_UNDEFINED as u32 { (*ret).text2 = self.context.stock_str(StockMessage::NoMessages).strdup(); } else { dc_lot_fill(ret, lastmsg, chat, lastcontact.as_ref(), self.context); diff --git a/src/constants.rs b/src/constants.rs index e055dc73d..a5180de98 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -89,6 +89,7 @@ pub const DC_MAX_GET_TEXT_LEN: usize = 30000; /// approx. max. length returned by dc_get_msg_info() pub const DC_MAX_GET_INFO_LEN: usize = 100000; +pub const DC_CONTACT_ID_UNDEFINED: usize = 0; pub const DC_CONTACT_ID_SELF: usize = 1; pub const DC_CONTACT_ID_DEVICE: usize = 2; pub const DC_CONTACT_ID_LAST_SPECIAL: usize = 9;