From d1dd50e9b05074688d4645fe40967c3dfe89d7ae Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 1 Feb 2015 16:04:16 +0100 Subject: [PATCH] Diaspora: The "new friend" notification now respects the corresponding setting/"new friend" notification isn't send via "remote self" anymore. --- include/diaspora.php | 2 +- include/items.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/diaspora.php b/include/diaspora.php index affd59d489..9edda5a9ef 100755 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -589,7 +589,7 @@ function diaspora_request($importer,$xml) { intval($importer['uid']) ); - if((count($r)) && (! $r[0]['hide-friends']) && (! $contact['hidden'])) { + if((count($r)) && (!$r[0]['hide-friends']) && (!$contact['hidden']) && intval(get_pconfig($importer['uid'],'system','post_newfriend'))) { require_once('include/items.php'); $self = q("SELECT * FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1", diff --git a/include/items.php b/include/items.php index 344b06ec8b..0a64ad448d 100644 --- a/include/items.php +++ b/include/items.php @@ -2715,6 +2715,10 @@ function item_is_remote_self($contact, &$datarray) { if ($datarray["app"] == $a->get_hostname()) return false; + // Only forward posts + if ($datarray["verb"] != ACTIVITY_POST) + return false; + if (($contact['network'] != NETWORK_FEED) AND $datarray['private']) return false; -- 2.39.5