diff options
author | Friendika <info@friendika.com> | 2011-08-14 20:38:31 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-08-14 20:38:31 -0700 |
commit | 0729e205c8149f5634b8622654a09382b50ec678 (patch) | |
tree | 3ed2e2725ebd97aa9b9a473e9c025d02483d1f02 /mod/follow.php | |
parent | 79529612226dc89b90df33ba066a530d0e716a69 (diff) | |
download | volse-hubzilla-0729e205c8149f5634b8622654a09382b50ec678.tar.gz volse-hubzilla-0729e205c8149f5634b8622654a09382b50ec678.tar.bz2 volse-hubzilla-0729e205c8149f5634b8622654a09382b50ec678.zip |
diaspora follow from friendika
Diffstat (limited to 'mod/follow.php')
-rw-r--r-- | mod/follow.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/mod/follow.php b/mod/follow.php index 80226f3b9..48bccc5aa 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -71,6 +71,7 @@ function follow_post(&$a) { $writeable = 1; } + // check if we already have a contact // the poll url is more reliable than the profile url, as we may have // indirect links or webfinger links @@ -175,10 +176,16 @@ function follow_post(&$a) { intval(local_user()) ); - - if((count($r)) && (x($contact,'notify')) && (strlen($contact['notify']))) { - require_once('include/salmon.php'); - slapper($r[0],$contact['notify'],$slap); + if(count($r)) { + if(($contact['network'] == NETWORK_OSTATUS) && (strlen($contact['notify']))) { + require_once('include/salmon.php'); + slapper($r[0],$contact['notify'],$slap); + } + if($contact['network'] == NETWORK_DIASPORA) { + require_once('include/diaspora.php'); + $ret = diaspora_share($a->user,$r[0]); + logger('mod_follow: diaspora_share returns: ' . $ret); + } } goaway($_SESSION['return_url']); |