Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe your changes :
In users/views.py -> Added Block User view, altered user_mumbles and user_article views so they don't show if an user is blocked. Altered following view so that they can't follow someone if they are blocked
in users/urls.py -> Added endpoint /api/users/{username}/block/
in users/models.py -> Added blocked_users ManyToMany Field in userprofile model.
In feed/views.py -> Changed Mumbles view so that it does not show the mumbles of users that have blocked or have been blocked.
#171
This feature allows users to block other users if they don't want to see a person's mumbles, articles, profiles. It also allows users to block someone if they don't want a user to see their mumbles, articles or profile.
User A blocks User B
User B cannot find user A's profile, mumbles or articles. His feed will stop showing User A's mumbles. User B will not be able to follow user A
User A will be able to find User A's profile, but only to unblock, User A will not be able to see User B's mumbles, articles or profile until he unblocks
Type of change :
Preview (Screenshots) :
I have 2 users my account and Test
I can see test's mumbles
This is mumbles list
I block test from my account
I will have to unblock to see their mumbles/articles again
This is mumbles list but I cannot see Test2 mumbles as he has been blocked
From Test user's account I cannot view my mumbles, articles as test has been blocked from my account
From Test user's account I cannot find my profile as test has been blocked from my account
Checklist:
Reviewers
@PraveenMalethia @MidouWebDev