1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-06-20 00:25:17 +00:00

Can get the list of friends of any user

This commit is contained in:
2019-12-31 09:54:29 +01:00
parent aac5d02a4f
commit e9bd11e61f
3 changed files with 63 additions and 2 deletions

View File

@ -137,6 +137,16 @@ export class UserHelper {
return (await this.GetUserInfo(userID)).allowPostsFromFriends;
}
/**
* Convenience function to check whether a friend list is
* public or not
*
* @param userID Target user ID
*/
public static async IsUserFriendListPublic(userID: number) : Promise<boolean> {
return (await this.GetUserInfo(userID)).friendsListPublic;
}
/**
* Check out whether a user can create a post on another user
* page