mirror of
				https://gitlab.com/comunic/comunicapiv3
				synced 2025-11-04 01:24:04 +00:00 
			
		
		
		
	Start to return advanced user info
This commit is contained in:
		@@ -208,6 +208,11 @@ impl<'a> RowResult<'a> {
 | 
			
		||||
            }))
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /// Get legacy boolean value : 1 = true / 0 = false
 | 
			
		||||
    pub fn get_legacy_bool(&self, name: &str) -> ResultBoxError<bool> {
 | 
			
		||||
        Ok(self.get_int64(name)? == 1)
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -52,6 +52,12 @@ fn exec_get_user_query(query: database::QueryInfo) -> ResultBoxError<User> {
 | 
			
		||||
            virtual_directory: res.get_optional_str("sous_repertoire")?,
 | 
			
		||||
            account_image_path: res.get_optional_str("account_image_path")?,
 | 
			
		||||
            account_image_visibility,
 | 
			
		||||
            public_friends_list: res.get_legacy_bool("liste_amis_publique")?,
 | 
			
		||||
            personal_website: res.get_optional_str("site_web")?,
 | 
			
		||||
            public_note: res.get_optional_str("public_note")?,
 | 
			
		||||
            block_comments_on_his_page: res.get_legacy_bool("bloquecommentaire")?,
 | 
			
		||||
            allow_posts_from_friends: res.get_legacy_bool("autoriser_post_amis")?,
 | 
			
		||||
            account_creation_time: 10,//TODO : parse date
 | 
			
		||||
        })
 | 
			
		||||
    })
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user