Skip to content

Limit the maximum number of followed users

What does this MR do and why?

This MR adds validation to limit the maximum number of people anyone can follow. The current set is 300 as taken for this issue #360755 (comment 1074284968) and once the user reaches this limit, he will be shown an alert (screenshot below) when trying to follow more peoples.

Anyone who is following more than 300 will not be affected. They won't be able to follow more users until they unfollow some and get the count below 300.

Related to: #360755 (comment 1074284968)

Screenshots or screen recordings

Using 2 as limit to demonstrate the alert, normally it will be 300. Screenshot_2022-09-08_at_10.49.06_AM

API endpoint is used in popup here Screenshot_2022-09-12_at_11.02.07_PM

How to set up and validate locally

  1. Follow 300 users or change the limit from Users::UserFollowUser and follow that many users
  2. Trying to follow more people will show above alert.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Pradosh Gaonkar

Merge request reports

Loading