From 41b74dd7ac2c879841873d59423be7d2577b6f87 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 12 Oct 2014 21:20:08 -0700 Subject: diaspora_send_status() - recalculate markdown translation to pickup any later message changes after original submission like wall-to-wall attributions for instance. Normally this would've come from our cached version which was stored prior to tag_deliver being run and therefore isn't yet aware that wall-to-wall status may have changed after delivery. --- include/diaspora.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/diaspora.php') diff --git a/include/diaspora.php b/include/diaspora.php index fb321a813..b35318eac 100755 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -2257,7 +2257,7 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) { $images = array(); $title = $item['title']; - $body = bb2diaspora_itembody($item); + $body = bb2diaspora_itembody($item,true); /* // We're trying to match Diaspora's split message/photo protocol but -- cgit v1.2.3 From 65b84e839a2acfad2f86c1ed40c9fdc67e4fc8ed Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 14 Oct 2014 18:47:08 -0700 Subject: back to wrestling with the !@#$ diaspora recursive reshare from hell --- include/diaspora.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'include/diaspora.php') diff --git a/include/diaspora.php b/include/diaspora.php index b35318eac..c6d4b7423 100755 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -927,9 +927,14 @@ function get_diaspora_reshare_xml($url,$recurse = 0) { // see if it's a reshare of a reshare - if($source_xml->root_diaspora_id && $source_xml->root_guid && $recurse < 15) { - $orig_author = notags(unxmlify($source_xml->root_diaspora_id)); - $orig_guid = notags(unxmlify($source_xml->root_guid)); + if($source_xml->post->reshare) + $xml = $source_xml->post->reshare; + else + return false; + + if($xml->root_diaspora_id && $xml->root_guid && $recurse < 15) { + $orig_author = notags(unxmlify($xml->root_diaspora_id)); + $orig_guid = notags(unxmlify($xml->root_guid)); $source_url = 'https://' . substr($orig_author,strpos($orig_author,'@')+1) . '/p/' . $orig_guid . '.xml'; $y = get_diaspora_reshare_xml($source_url,$recurse+1); if($y) -- cgit v1.2.3