Merge pull request #1339 from annando/1502-bugfix-friend-notification-diaspora

Improvement for the "new friend" notification with Diaspora and "remote self"
This commit is contained in:
Tobias Diekershoff 2015-02-02 21:51:35 +01:00
commit 2efc789aee
2 changed files with 5 additions and 1 deletions

View file

@ -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",

View file

@ -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;