aboutsummaryrefslogtreecommitdiffstats
path: root/include/follow.php
diff options
context:
space:
mode:
authortuscanhobbit <tuscanhobbit@users.noreply.github.com>2014-09-22 22:44:10 +0200
committertuscanhobbit <tuscanhobbit@users.noreply.github.com>2014-09-22 22:44:10 +0200
commit6a9e8fcd20c0101d448061fdbf51034ab456d2c3 (patch)
tree08e4a6d051636b90a98a6889a0b677a7d7049982 /include/follow.php
parented7f3001c1c1deec5076ae12114e5c42865b6251 (diff)
parent2070dbfdeace4a902208e9dfb50d950647142e99 (diff)
downloadvolse-hubzilla-6a9e8fcd20c0101d448061fdbf51034ab456d2c3.tar.gz
volse-hubzilla-6a9e8fcd20c0101d448061fdbf51034ab456d2c3.tar.bz2
volse-hubzilla-6a9e8fcd20c0101d448061fdbf51034ab456d2c3.zip
Merge from upstream
Diffstat (limited to 'include/follow.php')
-rw-r--r--include/follow.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/follow.php b/include/follow.php
index 18a9e66ea..38525982e 100644
--- a/include/follow.php
+++ b/include/follow.php
@@ -63,6 +63,13 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
$my_perms = PERMS_W_STREAM|PERMS_W_MAIL;
+ $role = get_pconfig($uid,'system','permissions_role');
+ if($role) {
+ $x = get_role_perms($role);
+ if($x['perms_follow'])
+ $my_perms = $x['perms_follow'];
+ }
+
logger('follow: ' . $url . ' ' . print_r($j,true), LOGGER_DEBUG);
@@ -136,7 +143,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
if(! $r) {
// attempt network auto-discovery
- if(strpos($url,'@')) {
+ if(strpos($url,'@') && (! $is_http)) {
$r = discover_by_webbie($url);
}
elseif($is_http) {
@@ -153,6 +160,12 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
$xchan_hash = $r[0]['xchan_hash'];
$their_perms = 0;
$my_perms = PERMS_W_STREAM|PERMS_W_MAIL;
+ $role = get_pconfig($uid,'system','permissions_role');
+ if($role) {
+ $x = get_role_perms($role);
+ if($x['perms_follow'])
+ $my_perms = $x['perms_follow'];
+ }
}
}