The Connection Status and Counter feature provides comprehensive insights into user relationships within your social platform. This functionality enables you to check the current relationship status between users and access detailed analytics about connections, followers, and pending requests.

Connection Status

Check relationship status between users: following, pending, none, or blocked

Connection Counters

Track follower, following, and pending request counts for user analytics

Connection Status Types

Available Connection Statuses:
StatusDescriptionUser Action Available
followingActive connection establishedCan unfollow
pendingFollow request sent, awaiting approvalCan withdraw request
noneNo relationship existsCan send follow request
blockedUser has been blockedCan unblock user
Status Transitions: Connection Counters Explained:

Following Count

Total number of users that the target user is following

Follower Count

Total number of users who are following the target user

Pending Count

Total number of follow requests the target user has received but not yet processed

Get User Follow Information

let userRepository = AmityUserRepository(client: client)
let userRelationship = userRepository.userRelationship

// To get the current user to follow information, use getMyFollowInfo.
token = userRelationship.getMyFollowInfo().observe({ liveObject, error in
    // Handle result
})

// To get the other's user follow information, use getFollowInfo with the userId parameter.
token = userRelationship.getFollowInfo(withUserId: "user-id").observe({ liveObject, error in
    // Handle result
})