Skip to main content

Follow Relationship

The FollowRelationship model represents a social connection between two users in the ContactsManager ecosystem, where one user follows another. This model is the foundation for social features like activity feeds and user discovery.

Properties

Identifiers

  • id: String - Unique identifier for the follow relationship
  • followerId: String - ID of the user who is following
  • followedId: String - ID of the user being followed
  • userId: String - External user ID of the followed user

Timestamps

  • createdAt: Date - When the follow relationship was created

Linked Profiles

  • follower: CanonicalContact? - Canonical profile of the follower
  • followed: CanonicalContact? - Canonical profile of the followed user
  • localContact: Contact? - Local device contact data if available

Usage Example

Accessing Follow Relationships

The SDK provides several methods to work with follow relationships:
  • Get Followers: Retrieve users following the current user
  • Get Following: Retrieve users the current user is following
  • Get Mutual Follows: Find users with bidirectional follow relationships
  • Follow User: Create a new follow relationship
  • Unfollow User: Remove an existing follow relationship
  • Check Follow Status: Determine if a user is being followed
These methods enable implementation of rich social features in your app, such as “Follow” buttons, follower lists, and personalized content feeds.