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:
commit
2efc789aee
2 changed files with 5 additions and 1 deletions
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue