]> git.mxchange.org Git - friendica.git/commitdiff
Reshare of reshares now work.
authorMichael Vogel <icarus@dabo.de>
Tue, 22 Mar 2016 22:00:42 +0000 (23:00 +0100)
committerMichael Vogel <icarus@dabo.de>
Tue, 22 Mar 2016 22:00:42 +0000 (23:00 +0100)
include/diaspora.php

index 632e3782c7d9981c245114beb110c25fb870a5fb..289f717708d4482949aa323e54ed402e898f878a 100644 (file)
@@ -1853,10 +1853,14 @@ class diaspora {
                        logger("reshared message ".$guid." already exists on system.");
 
                        // Maybe it is already a reshared item?
-                       // Then refetch the content, since there can be many side effects with reshared posts from other networks or reshares from reshares
-                       if (self::is_reshare($r[0]["body"], false))
+                       // Then refetch the content, if it is a reshare from a reshare.
+                       // 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"], true))
                                $r = array();
-                       else
+                       elseif (self::is_reshare($r[0]["body"], false)) {
+                               $r[0]["body"] = diaspora2bb(bb2diaspora($r[0]["body"]));
+                               return $r[0];
+                       } else
                                return $r[0];
                }