Skip to main content


Issue with contact deletion


@Friendica Support

Can someone confirm (test) the following issue for Friendica RC?

Contact A does have a mutual friendship with contact B. Both are Friendica contacts. If contact A deletes contact B, contact B is removed from the contact list of contact A.
But contact A won't be removed from contact B contact list.
I'm waiting for the "It's not a bug, it's a feature"™ reply.

In general, don't delete a contact, disconnect/unfollow instead. Deleting a contact is ambiguous and shouldn't be allowed at all.
If you really don't want a former contact to see your posts, does the node-level block in admin do that?
Contact deletion is the only possible action for removing contacts in the contacts list view. (coming from photoMenu: https://github.com/friendica/friendica/blob/develop/src/Model/Contact.php#L920)

Dropping or unfollowing a contact calls the same method: Contact::terminateFriendship() (Have a look at https://github.com/friendica/friendica/blob/develop/mod/contacts.php#L370 and https://github.com/friendica/friendica/blob/develop/mod/unfollow.php#L44) The only difference is that unfollow updates the contact to be a FOLLOWER and drop does remove the contact. So far so good.

But it seems that the remote side (contact B) will be never informed that something has changed in the relation ship. For contact B is contact A is still a mutual friendship.

I would swear that this is a new bug. I couldn't remember that I have to delete the contacts on both sides.

Update:
I tried "unfollowing" a mutual friendship and I get the message "You aren't following this contact."
I have been touching the unfollow feature for one-way relationships in the RC, can you please try unfollowing another sharing-only Friendica contact to make sure it works?
Is it something we can iron out with ActivityPub?
Time to open a release-blocking issue, I guess?
This must be the issue I had when I restored from a snapshot: people I had as friends after the snapshot couldn't see my posts and I couldn't add them. I had a message of "introduction already received" for the contacts in those scenarios.

Would deleting a contact have the same effect then? In that you couldn't re-add a contact since their node didn't update the change?
I had a message of "introduction already received"
This is another problem and happens when something went wrong with the friend request process (have look at https://github.com/friendica/friendica/issues/1012 and https://github.com/friendica/friendica/issues/1188)
Would deleting a contact have the same effect then? In that you couldn't re-add a contact since their node didn't update the change?
yes
Interesting info. Thanks. I'll make sure to choose unfollow in that case, just in case I want to add someone again later.
The AP implementation is the perfect occasion to rework it and ditch DFRN antics.
The relationship changes!
There is no "I deleted you as contact" message - and AFAIK there never had been
I knew it. I installed Friendica 3.4.3 and tested this. Result: if you delete a dfrn contact the contact is also deleted on the remote connection side.

You will find my log file (friendica-3.4.3_dop_dfrn_connection_log.txt) at https://owncloud.kommune4.de/index.php/s/yltHjcQCJzpHZRP

I guess this has something to do with https://github.com/friendica/friendica/blob/3.4.3/include/Contact.php#L136
but not today anymore.
Of cause not today.

Id did some testing the last hours and got it partly working.
I:
1.) restored https://github.com/friendica/friendica/commit/59dd353464ebe47b80530e68496b6e01c047feaf#diff-0ec3dc3911bfa8391be312400948f5a1R189 in Contact::terminateFriendship()

2.) commented out https://github.com/friendica/friendica/blob/develop/src/Protocol/DFRN.php#L1171 in DFRN::deliver() to restore the old behavior

3.) changed to $importer['cprvkey'] and $importer['cpubkey'] at https://github.com/friendica/friendica/blob/develop/mod/dfrn_notify.php#L325-L326 because we need the keys of the contact

After this changes the remote side will be notified about the termination of the friendship and also drops the contact.

Note:
We need a solution for unfollowing a contact. After the changes of 1.) the relationship will be also dissolved remotely when a user just want to unffollow a contact
OK testing results.
Dropping contacts works like a charm again. So here is everything fine again.

I don't know how unfollowing was intended.
At the moment it seems to work this way: Contact A unfollows contact B and contact B becomes a fan in contact A's contact list. Contact A is still a mutual friendship in contact B's contact list.
If contact A wants he/she can visit the contact entry of contact B in his/her own contact list and can upgrade the relationship again to a mutual friendship.

Like I said the only thing which is unpolished is that contact B isn't noticed when contact A degrades contact B to a fan. But maybe we can implement something similar like it is done for dissolving (https://github.com/friendica/friendica/blob/develop/mod/dfrn_notify.php#L122)
This entry was edited (4 years ago)
this doesn't happen.

Hypolite Petovan doesn't like this.