Skip to content

Conversation

@CHRISTOPHERKADOGO
Copy link
Contributor

Description

This PR adds an is_following flag to the user data response in the get_users_data method. This boolean field indicates whether the currently authenticated user is following each user in the returned list.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • [ X] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Trello Ticket ID

Please add a link to the Trello ticket for the task.

How Can This Be Tested?

Test Scenario 1: Authenticated user with following relationships

  1. Log in as User A
  2. Follow User B and User C (but not User D)
  3. Make a GET request to the users endpoint
  4. Verify the response includes is_following: true for User B and User C
  5. Verify the response includes is_following: false for User D

Test Scenario 2: Paginated results

  1. Log in as a user with multiple following relationships
  2. Request users with pagination parameters (e.g., page=1&per_page=5)
  3. Verify each user object has the is_following flag
  4. Verify the flag accurately reflects the following status

Test Scenario 3: Unauthenticated request

  1. Make a GET request to the users endpoint without authentication
  2. Verify all users have is_following: false

Test Scenario 4: With search and filters

  1. Log in as a user
  2. Use search parameters (e.g., search=john)
  3. Use filter types (e.g., filter_type=trending)
  4. Verify is_following flag is present and accurate in all cases

Copy link
Contributor

@rhodinemma rhodinemma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for this @CHRISTOPHERKADOGO

@rhodinemma rhodinemma merged commit 17dd015 into staging Oct 7, 2025
2 checks passed
@rhodinemma rhodinemma deleted the feat/user-following-status branch October 7, 2025 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants