aboutsummaryrefslogtreecommitdiffstats
path: root/mod/zfinger.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/zfinger.php')
-rw-r--r--mod/zfinger.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/mod/zfinger.php b/mod/zfinger.php
index cf61233ad..d5b750537 100644
--- a/mod/zfinger.php
+++ b/mod/zfinger.php
@@ -71,6 +71,8 @@ function zfinger_init(&$a) {
$id = $e['channel_id'];
+ $special_channel = (($e['channel_pageflags'] & PAGE_PREMIUM) ? true : false);
+
$searchable = (($e['channel_pageflags'] & PAGE_HIDDEN) ? false : true);
if($e['xchan_flags'] & XCHAN_FLAGS_HIDDEN)
$searchable = false;
@@ -134,6 +136,16 @@ function zfinger_init(&$a) {
$ret['searchable'] = $searchable;
+ // premium or other channel desiring some contact with potential followers before connecting.
+ // This is a template - %s will be replaced with the follow_url we discover for the return channel.
+
+ if($special_channel)
+ $ret['connect_url'] = z_root() . '/connect/' . $e['channel_address'] . '?f=&follow=%s';
+
+ // This is a template for our follow url, %s will be replaced with a webbie
+
+ $ret['follow_url'] = z_root() . '/follow?f=&url=%s';
+
$permissions = get_all_perms($e['channel_id'],(($ztarget && $zsig)
? base64url_encode(hash('whirlpool',$ztarget . $zsig,true))
: '' ),false);