From 9dac46ca25b11f80dded42db31e7e062fc7b5142 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 1 Sep 2014 22:59:11 -0700 Subject: minor nits --- include/diaspora.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/diaspora.php b/include/diaspora.php index b544dad53..2f32053f8 100755 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -2584,18 +2584,22 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) { * */ - $handle = diaspora_handle_from_contact($item['author_xchan']); + if($item['author_xchan'] === $owner['channel_hash']) + $handle = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3); + else + $handle = diaspora_handle_from_contact($item['author_xchan']); + if(! $handle) { logger('diaspora_send_relay: no handle'); return; } if($relay_retract) - $sender_signed_text = $item['guid'] . ';' . $target_type; + $sender_signed_text = $item['mid'] . ';' . $target_type; elseif($like) - $sender_signed_text = $item['guid'] . ';' . $target_type . ';' . $parent['guid'] . ';' . $positive . ';' . $handle; + $sender_signed_text = $item['mid'] . ';' . $target_type . ';' . $parent['mid'] . ';' . $positive . ';' . $handle; else - $sender_signed_text = $item['guid'] . ';' . $parent['guid'] . ';' . $text . ';' . $handle; + $sender_signed_text = $item['mid'] . ';' . $parent['mid'] . ';' . $text . ';' . $handle; // Sign the relayable with the top-level owner's signature // -- cgit v1.2.3