aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Libzot.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Lib/Libzot.php')
-rw-r--r--Zotlabs/Lib/Libzot.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index 89157bf5e..bc944c97c 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -2569,9 +2569,14 @@ class Libzot {
if (!$observer)
return '';
- $parsed = parse_url($observer['xchan_url']);
+ $url = $observer['xchan_url'];
+ if (preg_match('|^https?://|', $url) === 0) {
+ $url = "https://{$url}";
+ }
+
+ $parsed = parse_url($url);
- return $parsed['scheme'] . '://' . $parsed['host'] . (($parsed['port']) ? ':' . $parsed['port'] : '') . '/rpost?f=';
+ return $parsed['scheme'] . '://' . $parsed['host'] . (isset($parsed['port']) ? ':' . $parsed['port'] : '') . '/rpost?f=';
}
/**