aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Connect.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Lib/Connect.php')
-rw-r--r--Zotlabs/Lib/Connect.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Connect.php b/Zotlabs/Lib/Connect.php
index 4de41526b..9f6d077b4 100644
--- a/Zotlabs/Lib/Connect.php
+++ b/Zotlabs/Lib/Connect.php
@@ -5,8 +5,7 @@ namespace Zotlabs\Lib;
use App;
use Zotlabs\Access\Permissions;
use Zotlabs\Daemon\Master;
-
-
+use Zotlabs\Lib\Config;
class Connect {
@@ -25,10 +24,16 @@ class Connect {
$uid = $channel['channel_id'];
- if (strpos($url,'@') === false && strpos($url,'/') === false) {
+ // If we get just a channel name and it is not an URL turn it into a local webbie
+ if (!str_contains($url, '@') && strpos($url,'/') === false) {
$url = $url . '@' . App::get_hostname();
}
+ // Remove a possible leading @
+ if (str_starts_with($url, '@')) {
+ $url = ltrim($url, '@');
+ }
+
$result = [ 'success' => false, 'message' => '' ];
$my_perms = false;
@@ -96,7 +101,7 @@ class Connect {
$wf = discover_by_webbie($url,$protocol);
if (! $wf) {
- $feeds = get_config('system','feed_contacts');
+ $feeds = Config::Get('system','feed_contacts');
if (($feeds) && (in_array($protocol, [ '', 'feed', 'rss' ]))) {
$d = discover_by_url($url);