diff --git a/src/chat.rs b/src/chat.rs index be256e5984..b045f781cd 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -3493,6 +3493,8 @@ pub async fn get_chat_contacts(context: &Context, chat_id: ChatId) -> Result Result> { let now = time(); let list = context @@ -3505,7 +3507,7 @@ pub async fn get_past_chat_contacts(context: &Context, chat_id: ChatId) -> Resul WHERE cc.chat_id=? AND cc.add_timestamp < cc.remove_timestamp AND ? < cc.remove_timestamp - ORDER BY c.id=1, c.last_seen DESC, c.id DESC", + ORDER BY c.id=1, cc.remove_timestamp DESC, c.id DESC", (chat_id, now.saturating_sub(60 * 24 * 3600)), |row| row.get::<_, ContactId>(0), |ids| ids.collect::, _>>().map_err(Into::into),