Ticket #291 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

mod/friend functionality for unfriend is broken

Reported by: eavdmeer Assigned to: ewout
Priority: normal Milestone: 0.9.1
Component: core Version: 0.9.0
Severity: normal Keywords:
Cc: Patch Included: 1
Review Stage: accepted

Description

It is not possible to remove friends from your friends list. The functionality is present in mod/friend, but it cannot be used because the menu links are never drawn due to code that is not working.

Use the attached patch from the elgg/mod/friend directory:

patch -p0 < patch.unfriend

Attachments

patch.unfriend (3.1 kB) - added by eavdmeer on 01/29/08 12:54:04.

Change History

01/29/08 12:54:04 changed by eavdmeer

  • attachment patch.unfriend added.

01/29/08 13:05:33 changed by eavdmeer

  • haspatch set to 1.

01/29/08 17:34:47 changed by ewout

  • owner changed from nobody to ewout.
  • status changed from new to assigned.
  • review_stage changed from unreviewed to accepted.

I understand correctly that the objective is to put delete links next to the icons on the username/friends screen, right? (friends can be removed by visiting their profiles and clicking the link in the sidebar).

I wonder if we really want such an interface, but I am curious to see what others think.

The patch applies cleanly and seems to work as advertised. I will look a bit more this patch and wait for other opinions before aplying it though.

[Could you give your patches the .diff or .patch extension (unfriend.patch)? That way Trac knows to syntax-highlight it. Also, diff -u is easier, for me at least. ]

01/31/08 07:45:58 changed by eavdmeer

Actually, I didn't add any functionality. I was about to write an unfriend mod (I couldn't figure out how to unfriend someone, maybe something for the docs??) when I stumbled upon code to remove a friend in mod/friend. However, the conditions around the links were such that these links were never drawn. I figured it would be a good idea to fix that, especially because it is more consistent with the way you unfriend communities. The missing remove link is why I thought the functionality was missing in the first place.

I'll use .patch as extension for my patches in the future. No problem. Think I can do unified diffs as well ;-)

02/03/08 19:33:19 changed by ewout

  • status changed from assigned to closed.
  • resolution set to fixed.

I checked this in, partially, in r1543. I did not check in the parts which assume a symmetric friend relationship, since friendships are not symmetric in elgg. Also, the patch put a remove link next to the friendsof list, which does not make sense: you cannot remove yourself from another persons friends list.

02/04/08 09:05:05 changed by eavdmeer

Makes sense that you didn't check in the 'remove friendof'. Oddly enough, that was the only spot that had a (albeit invisible) remove link in the first place. I added the link in the friends_edit.php, but not to friedsof_edit.php.

On the other hand, it might make sense to remove yourself from another persons friend list. It is consistent if you have enabled moderation for friend relations. Is someone wants to be your friend and you approve their request, they are added to your 'friendsof' and not your 'friends'. After you 'break up' with someone, you may not want them to list you as a friend anymore.

02/04/08 12:24:20 changed by ewout

See also the discussion in #183.