Relationships
Understand the different types of player relationships tracked by Friends.
Read time 2 minutesLast updated 19 hours ago
The Friends service manages relationships of different types. In general, most user relationships don’t change often; however, there are updates users often want to know about as soon as possible. To increase efficiency, the Friends SDK fetches all of a user’s relationships one time at startup, then keeps the list up to date using push notifications. A relationship is a status between two users. Some relationship statuses require consent from both users and others only require consent from one user. The Friends SDK automatically groups the different relationships and exposes a collection for each relationship type. The relationship types include friend requests, friends, and blocks.
- The friend requests collection includes all incoming and outgoing friend requests. The role property of the relationship members identifies whether it’s incoming or outgoing. Refer to friend request. The maximum number of pending friend requests (both incoming AND outgoing) is 10.
- The friends collection has all of a user’s active friendships. Refer to friends list. The maximum number of active friendships is 50.
- The blocks collection has all the users a user has blocked. Refer to block list. The maximum number of active blocks is 10.
FRIEND_REQUEST- A member with a role (the sender).
SOURCE - A member with a role (the receiver).
TARGET
NONEFRIEND_REQUESTFRIENDSendFriendRequestAsyncCreateRelationshipFRIEND_REQUESTFRIEND_REQUESTFRIENDSendFriendRequestAsyncFRIEND_REQUESTFRIEND
When two users have a friend relationship, each user exists on the other user's friends list. This relationship type requires consent from both users, but only one user needs to start the creation of the relationship by sending a friend request.
Two users have a block relationship when one user blocks another user (by adding them to their block list). This relationship type only requires consent from the user performing the block.