aboutsummaryrefslogtreecommitdiffstats
path: root/include/follow.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-08-21 22:10:08 -0700
committerfriendica <info@friendica.com>2013-08-21 22:10:08 -0700
commit925b046794b77345c1321a3c74e4561d5c10ec95 (patch)
tree607a59b59d7f60f2e6b615b5454758f76254cdf2 /include/follow.php
parent6cea04eb440c2bb08bcb81ae13749c08d09b755c (diff)
downloadvolse-hubzilla-925b046794b77345c1321a3c74e4561d5c10ec95.tar.gz
volse-hubzilla-925b046794b77345c1321a3c74e4561d5c10ec95.tar.bz2
volse-hubzilla-925b046794b77345c1321a3c74e4561d5c10ec95.zip
premium/restricted channel connections implemented, configure at yoursite/channel/nickname - this basically redirects "follow" requests to a premium channel's sell page if it has one configured. You can still click through and create a connection request (introduction), but this provides a means for the channel owner to state their terms. If you don't abide by the terms, you will likely be blocked or the channel deleted. This facility is extensible in a number of ways.
Diffstat (limited to 'include/follow.php')
-rw-r--r--include/follow.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/follow.php b/include/follow.php
index ce550b07f..510c6cd7e 100644
--- a/include/follow.php
+++ b/include/follow.php
@@ -11,7 +11,7 @@
require_once('include/zot.php');
-function new_contact($uid,$url,$channel,$interactive = false) {
+function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) {
$result = array('success' => false,'message' => '');
@@ -60,6 +60,11 @@ function new_contact($uid,$url,$channel,$interactive = false) {
return $result;
}
+ // Premium channel, set confirm before callback to avoid recursion
+
+ if(array_key_exists('connect_url',$j) && (! $confirm))
+ goaway($j['connect_url']);
+
// check service class limits