Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Allow resubmission of friend requests after rejection #193

Open
pfcodes opened this issue Nov 2, 2023 · 0 comments
Open

Comments

@pfcodes
Copy link

pfcodes commented Nov 2, 2023

Problem

Currently, within this library, once a friend request is rejected, there's no option to allow the resubmission of that friend request. This can lead to a problematic situation where a user accidentally rejects a friend request and can't receive a new request from the same user.

Suggested Feature/Enhancement

It would be beneficial to add functionality that allows users to resubmit a friend request after it has been rejected. This could be implemented with an optional setting that, when enabled, either allows immediate resubmission or sets a cooldown period after which a new request can be sent. Or it can also be as simple as changing these rejected__isnull to the guards in FriendshipManager.add_friend:

        if FriendshipRequest.objects.filter(
            from_user=from_user, to_user=to_user, rejected__isnull=False 
        ).exists():
            raise AlreadyExistsError("You already requested friendship from this user.")

        if FriendshipRequest.objects.filter(
            from_user=to_user, to_user=from_user, rejected__isnull=False 
        ).exists():
            raise AlreadyExistsError("This user already requested friendship from you.")

Alternatives Considered

Some might argue that allowing the resubmission of friend requests could open the door to spamming. However, a simple yet effective solution to this concern is to utilize the existing blocking functionality. If a user does not want to receive further requests from someone, they have the option to block that individual. This way, users are empowered to prevent spam without hindering genuine connection attempts due to accidental rejections.

Additional Context

This change would enhance the user experience by adding flexibility and forgiveness to the friend request process, which, as of now, is quite rigid and unforgiving of mistakes. The ability to control whether or not to allow resubmissions could be a setting at the admin level, providing the site operators with the ability to tailor the behavior according to their community's needs.

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

No branches or pull requests

1 participant