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.
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.
Hypolite Petovan
In general, don't delete a contact, disconnect/unfollow instead. Deleting a contact is ambiguous and shouldn't be allowed at all.
JB Carroll likes this.
JB Carroll
Rabuzarus
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."
Hypolite Petovan likes this.
Hypolite Petovan
Hypolite Petovan
Rabuzarus
1.) dropping the contact
2.) unfollow a contact
And at the moment it seems that Contact B is never informed that Contact A did change something in their relationship. An at least for dropping a contact I would swear that it has been working in former versions.
If we don't fix it we will get situations, which are problematically. Think of following situation: contact A drops contact B. After half a year contact a does request a friendship again. He/she can't because contact A will get a notice that he/she is already A friend because contact B did never get a notice that user A has dropped him/her some time ago.
If contact B has disabled 'private message from unknown" what could contact A do?
Or lets think about the the other case Contact A drops contact B. Contact B is writing messages to contact A and he/she is wondering why contact A is never answering. Contact B is also not possible to remote authenticate on contacts A profile page (dfrn auth wouldn't work because it isn't a real mutual friendship and openWebAuth isn't used... show more
1.) dropping the contact
2.) unfollow a contact
And at the moment it seems that Contact B is never informed that Contact A did change something in their relationship. An at least for dropping a contact I would swear that it has been working in former versions.
If we don't fix it we will get situations, which are problematically. Think of following situation: contact A drops contact B. After half a year contact a does request a friendship again. He/she can't because contact A will get a notice that he/she is already A friend because contact B did never get a notice that user A has dropped him/her some time ago.
If contact B has disabled 'private message from unknown" what could contact A do?
Or lets think about the the other case Contact A drops contact B. Contact B is writing messages to contact A and he/she is wondering why contact A is never answering. Contact B is also not possible to remote authenticate on contacts A profile page (dfrn auth wouldn't work because it isn't a real mutual friendship and openWebAuth isn't used because contact B thinks it is a mutual friendship and is using dfrn auth).
Contact B can't give a good bug report about the problem. All he/she can do is saying "Contact A isn't answering anymore. Maybe his/her server does have problems, maybe there is a bug or maybe he/she is dead"
We really, really, really should avoid such situations.
Hypolite Petovan
Rabuzarus likes this.
JB Carroll
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?
Rabuzarus
yes
JB Carroll
Hypolite Petovan
Hypolite Petovan
Rabuzarus
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
Rabuzarus
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 behavior3.) 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 contactAfter 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
2 people like this
JB Carroll and Hypolite Petovan like this.
Jeroen De Meerleer
Hypolite Petovan likes this.
Rabuzarus
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)
Rabuzarus
Hypolite Petovan doesn't like this.