diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/connect.php | 3 | ||||
-rw-r--r-- | mod/zfinger.php | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/mod/connect.php b/mod/connect.php new file mode 100644 index 000000000..21d461c19 --- /dev/null +++ b/mod/connect.php @@ -0,0 +1,3 @@ +<?php /** @file */ + +// Placeholder for channel sell pages 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); |