diff options
author | Mario <mario@mariovavti.com> | 2025-03-09 10:00:53 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2025-03-09 10:00:53 +0000 |
commit | 48f5acced325fa3bf9390d5f03165db0c250b52c (patch) | |
tree | 2c252e792035f1b3ab60583a94403b9838e87ed6 /Zotlabs | |
parent | 13e2d2f65486da2c02fbf9848bbfd0b0c1cabd44 (diff) | |
download | volse-hubzilla-48f5acced325fa3bf9390d5f03165db0c250b52c.tar.gz volse-hubzilla-48f5acced325fa3bf9390d5f03165db0c250b52c.tar.bz2 volse-hubzilla-48f5acced325fa3bf9390d5f03165db0c250b52c.zip |
remove leading @
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Connect.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Zotlabs/Lib/Connect.php b/Zotlabs/Lib/Connect.php index b8e7a5c4e..a68f73e6c 100644 --- a/Zotlabs/Lib/Connect.php +++ b/Zotlabs/Lib/Connect.php @@ -24,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; |