mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 13:36:59 +00:00
fix: collect IDs as set first to deduplicate entries
This commit is contained in:
@@ -305,12 +305,12 @@ impl IntoUsers for Message {
|
||||
|
||||
impl IntoUsers for Vec<Message> {
|
||||
fn get_user_ids(&self) -> Vec<String> {
|
||||
let mut ids = vec![];
|
||||
let mut ids = HashSet::new();
|
||||
for message in self {
|
||||
ids.append(&mut message.get_user_ids());
|
||||
ids.extend(&mut message.get_user_ids().into_iter());
|
||||
}
|
||||
|
||||
ids
|
||||
ids.into_iter().collect()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user