From aba93df94fb0381e6f8c43c0a441062aa83848c0 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 3 May 2018 04:43:50 +0000 Subject: [PATCH 1/2] Ensure that the link will be displayed correctly on Diaspora --- src/Content/Text/BBCode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 6c441bac6..c3ac41ce4 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -965,7 +965,7 @@ class BBCode extends BaseObject } if (stripos(normalise_link($link), 'http://twitter.com/') === 0) { - $text .= '
' . $link . ''; + $text .= '
' . $link . ''; } else { $text .= $headline . '
' . trim($share[3]) . "

"; From 53b7028d35a5b6b2ea07d9136b7eefbb11a94df9 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 3 May 2018 13:03:41 +0000 Subject: [PATCH 2/2] Reshares had been detected falsely so that were rejected by Diaspora --- src/Content/Text/BBCode.php | 2 +- src/Protocol/Diaspora.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index c3ac41ce4..6c441bac6 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -965,7 +965,7 @@ class BBCode extends BaseObject } if (stripos(normalise_link($link), 'http://twitter.com/') === 0) { - $text .= '
' . $link . ''; + $text .= '
' . $link . ''; } else { $text .= $headline . '
' . trim($share[3]) . "

"; diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 7b3b843a1..b6c615887 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -3571,8 +3571,12 @@ class Diaspora $ret["root_guid"] = $guid; return $ret; } + } elseif (($guid == "") && $complete) { + return false; } + $ret["root_guid"] = $guid; + $profile = ""; preg_match("/profile='(.*?)'/ism", $attributes, $matches); if ($matches[1] != "") { @@ -3593,10 +3597,6 @@ class Diaspora } } - if (!empty($guid)) { - $ret["root_guid"] = $guid; - } - if (empty($ret) && !$complete) { return true; }