diff options
author | friendica <info@friendica.com> | 2014-08-05 17:47:17 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-08-05 17:47:17 -0700 |
commit | 8da548344be6493aeedc7d9896bc784880dff3fe (patch) | |
tree | 86eaa2b5201ee539c67e03153a970e8a24d567cd /mod/connedit.php | |
parent | 8b1f9b14254794e4e247ba008a70e053d017bb5f (diff) | |
download | volse-hubzilla-8da548344be6493aeedc7d9896bc784880dff3fe.tar.gz volse-hubzilla-8da548344be6493aeedc7d9896bc784880dff3fe.tar.bz2 volse-hubzilla-8da548344be6493aeedc7d9896bc784880dff3fe.zip |
clone sync of "unfriend" actions
Diffstat (limited to 'mod/connedit.php')
-rw-r--r-- | mod/connedit.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/mod/connedit.php b/mod/connedit.php index 30780180e..7d20890fa 100644 --- a/mod/connedit.php +++ b/mod/connedit.php @@ -359,11 +359,21 @@ function connedit_content(&$a) { if($cmd === 'drop') { require_once('include/Contact.php'); + // FIXME -// terminate_friendship($a->get_channel(),$orig_record[0]); +// We need to send either a purge or a refresh packet to the other side (the channel being unfriended). +// The issue is that the abook DB record _may_ get destroyed when we call contact_remove. As the notifier runs +// in the background there could be a race condition preventing this packet from being sent in all cases. +// PLACEHOLDER contact_remove(local_user(), $orig_record[0]['abook_id']); -// FIXME - send to clones + build_sync_packet(0 /* use the current local_user */, + array('abook' => array( + 'abook_xchan' => $orig_record[0]['abook_xchan'], + 'entry_deleted' => true) + ) + ); + info( t('Connection has been removed.') . EOL ); if(x($_SESSION,'return_url')) goaway($a->get_baseurl(true) . '/' . $_SESSION['return_url']); |