File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -3493,6 +3493,8 @@ pub async fn get_chat_contacts(context: &Context, chat_id: ChatId) -> Result<Vec
3493
3493
}
3494
3494
3495
3495
/// Returns a vector of contact IDs for given chat ID that are no longer part of the group.
3496
+ ///
3497
+ /// Members that have been removed recently are in the beginning of the list.
3496
3498
pub async fn get_past_chat_contacts ( context : & Context , chat_id : ChatId ) -> Result < Vec < ContactId > > {
3497
3499
let now = time ( ) ;
3498
3500
let list = context
@@ -3505,7 +3507,7 @@ pub async fn get_past_chat_contacts(context: &Context, chat_id: ChatId) -> Resul
3505
3507
WHERE cc.chat_id=?
3506
3508
AND cc.add_timestamp < cc.remove_timestamp
3507
3509
AND ? < cc.remove_timestamp
3508
- ORDER BY c.id=1, c.last_seen DESC, c.id DESC" ,
3510
+ ORDER BY c.id=1, cc.remove_timestamp DESC, c.id DESC" ,
3509
3511
( chat_id, now. saturating_sub ( 60 * 24 * 3600 ) ) ,
3510
3512
|row| row. get :: < _ , ContactId > ( 0 ) ,
3511
3513
|ids| ids. collect :: < Result < Vec < _ > , _ > > ( ) . map_err ( Into :: into) ,
You can’t perform that action at this time.
0 commit comments