diff options
author | marijus <mario@mariovavti.com> | 2014-08-25 09:34:05 +0200 |
---|---|---|
committer | marijus <mario@mariovavti.com> | 2014-08-25 09:34:05 +0200 |
commit | a512f54d93599d9680113a7572182cc53679496c (patch) | |
tree | c02e97ee4c3b3cd587843edc6eb58bf86f86f6f5 /include/follow.php | |
parent | 5a080881c59fae817b9c23a72e89525edf2f1f59 (diff) | |
parent | e0ee66d0b40247e05d4cbc1ca7687b74b1bc88d9 (diff) | |
download | volse-hubzilla-a512f54d93599d9680113a7572182cc53679496c.tar.gz volse-hubzilla-a512f54d93599d9680113a7572182cc53679496c.tar.bz2 volse-hubzilla-a512f54d93599d9680113a7572182cc53679496c.zip |
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'include/follow.php')
-rw-r--r-- | include/follow.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/include/follow.php b/include/follow.php index d98a58198..55249db2b 100644 --- a/include/follow.php +++ b/include/follow.php @@ -117,14 +117,25 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) } else { - // attempt network auto-discovery - $my_perms = 0; $their_perms = 0; $xchan_hash = ''; - + $r = q("select * from xchan where xchan_hash = '%s' limit 1", + dbesc($url) + ); + if(! $r) { + // attempt network auto-discovery + if(strpos($url,'@')) { + $r = discover_by_webbie($url); + } + } + if($r) { + $xchan_hash = $url; + $their_perms = 0; + $my_perms = PERMS_W_STREAM|PERMS_W_MAIL; + } } |