Mark contact acceptance notifications as read automatically

This commit is contained in:
Max Brunsfeld 2023-10-22 11:57:01 +02:00
parent fce09e8c92
commit 4a0358a513
6 changed files with 99 additions and 7 deletions

View file

@ -400,6 +400,12 @@ impl UserStore {
&self.incoming_contact_requests
}
pub fn has_incoming_contact_request(&self, user_id: u64) -> bool {
self.incoming_contact_requests
.iter()
.any(|user| user.id == user_id)
}
pub fn outgoing_contact_requests(&self) -> &[Arc<User>] {
&self.outgoing_contact_requests
}