aboutsummaryrefslogtreecommitdiffstats
path: root/mod/zfinger.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-08-21 17:15:56 -0700
committerfriendica <info@friendica.com>2013-08-21 17:15:56 -0700
commit2d3a489f5171a8fe8b6b7aeb022c945a689d9f1a (patch)
treeaef39fd3b1a1c4cf51561b8a2e67cf5b253e4842 /mod/zfinger.php
parentd8ef1417fb2ff8d736e4392c118c51c63dc66b1d (diff)
downloadvolse-hubzilla-2d3a489f5171a8fe8b6b7aeb022c945a689d9f1a.tar.gz
volse-hubzilla-2d3a489f5171a8fe8b6b7aeb022c945a689d9f1a.tar.bz2
volse-hubzilla-2d3a489f5171a8fe8b6b7aeb022c945a689d9f1a.zip
basic structure for premium channel implementation
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);