diff options
Diffstat (limited to 'include/Contact.php')
-rw-r--r-- | include/Contact.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/Contact.php b/include/Contact.php index bf536ccd5..46d356f3f 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -15,13 +15,20 @@ function rconnect_url($channel_id,$xchan) { if($r) return ''; + $r = q("select * from xchan where xchan_hash = '%s' limit 1", + dbesc($xchan) + ); + + if(($r) && ($r[0]['xchan_follow'])) + return $r[0]['xchan_follow']; + $r = q("select hubloc_url from hubloc where hubloc_hash = '%s' and ( hubloc_flags & %d ) limit 1", dbesc($xchan), intval(HUBLOC_FLAGS_PRIMARY) ); if($r) - return $r[0]['hubloc_url']; + return $r[0]['hubloc_url'] . '/follow?f=&url=%s'; return ''; } |