X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fdiaspora.php;h=2ff7a90cfbe677cc4eb92a880a4fb7be39bfb09d;hb=7e6598f2c01dc25b9420309dac1ec84160f21a03;hp=0556511857ea0f9eb8c1297e41d4b4ee5a330323;hpb=778935eb48e9700ca2e879b1fe377541817705a0;p=friendica.git diff --git a/include/diaspora.php b/include/diaspora.php index 0556511857..2ff7a90cfb 100644 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -2,41 +2,6 @@ /** * @file include/diaspora.php * @brief The implementation of the diaspora protocol - * - * Checklist: - * - * Checked: - * - send status - * - send comment - * - send like - * - send mail - * - send status retraction - * - send comment retraction on own post - * - send like retraction on own post - * - send comment retraction on diaspora post - * - send like retraction on diaspora post - * - receive status - * - receive reshare - * - receive comment - * - receive like - * - receive connect request - * - receive profile data - * - receive mail - * - receive comment retraction - * - receive like retraction - * - relay comment - * - relay like - * - relay comment retraction from diaspora - * - relay comment retraction from friendica - * - relay like retraction from diaspora - * - relay like retraction from friendica - * - send share - * - * Should work: - * - receive account deletion - * - send unshare - * - * Unchecked: */ require_once("include/items.php"); @@ -1945,8 +1910,13 @@ class diaspora { FROM `item` WHERE `id` = %d AND `visible` AND NOT `deleted` AND `body` != '' LIMIT 1", intval($item_id)); - if ($r) + if ($r) { + // If it is a reshared post from another network then reformat to avoid display problems with two share elements + if (self::is_reshare($r[0]["body"], false)) + $r[0]["body"] = diaspora2bb(bb2diaspora($r[0]["body"])); + return $r[0]; + } } } @@ -2580,7 +2550,7 @@ class diaspora { // Skip if it isn't a pure repeated messages // Does it start with a share? - if (strpos($body, "[share") > 0) + if ((strpos($body, "[share") > 0) AND $complete) return(false); // Does it end with a share?