uchicago-cs / chigame

BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Allow for removing Friends #332

Closed omarelkashef closed 11 months ago

omarelkashef commented 11 months ago

The Remove Friend button on profile pages now does not direct to anything. We need to create a remove friend functionality. Users can not remove friends while logged out or remove other users they are not friends with or users that do not exist. Moreover, this function should also remove the friend invite that exists between these two users.

omarelkashef commented 11 months ago

We also refactored the code for retrieving a FriendInvitation given the two parties involved into a custom Manager method called FriendInvitationManager.get_by_users()

omarelkashef commented 11 months ago

We realized a bug in NotificationQuerySet.get_by_actor(). The logic uses get() to retrieve a Notification and then is_not_deleted() is called on the return value of the get() which is a Notification object while is_not_deleted() is a method of NotificationQuerySet not Notification. This has been reported in issue #333

omarelkashef commented 11 months ago

Closing Statement: Remove Friend button on profile pages now works. Users can now remove friends while logged out or remove other users they are not friends with or users that do not exist. @AndrewM131 @henrietta-k worked on the view function for removing friends @omarelkashef worked on on the logic of unfriending users

elizabethli31 commented 10 months ago

Issue Score: Excellent

Comments: Great job expanding possible actions with the friends feature!