mirror of
				https://gitlab.com/comunic/comunicapiv3
				synced 2025-11-04 01:24:04 +00:00 
			
		
		
		
	Can delete notification targeting a user about a post
This commit is contained in:
		@@ -285,6 +285,16 @@ pub fn delete_all_related_to_group_membership_notifications(user_id: &UserID, gr
 | 
			
		||||
    Ok(())
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/// Delete all the notifications about a post targeting a specified user
 | 
			
		||||
pub fn delete_all_post_notifications_targeting_user(user_id: &UserID, post_id: PostID) -> ResultBoxError {
 | 
			
		||||
    let n = PartialNotification::new()
 | 
			
		||||
        .set_dest_user_id(user_id)
 | 
			
		||||
        .set_on_elem_type(NotifElemType::POST)
 | 
			
		||||
        .set_on_elem_id(post_id);
 | 
			
		||||
 | 
			
		||||
    delete(&n)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/// Delete all the notifications related with a post
 | 
			
		||||
pub fn delete_all_related_with_post(post_id: PostID) -> ResultBoxError {
 | 
			
		||||
    let n = PartialNotification::new()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user