aboutsummaryrefslogtreecommitdiffstats
path: root/include/diaspora.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/diaspora.php')
-rwxr-xr-xinclude/diaspora.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 80fb10404..a398007e1 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -1560,7 +1560,8 @@ function diaspora_photo($importer,$xml,$msg) {
$link_text = '[img]' . $remote_photo_path . $remote_photo_name . '[/img]' . "\n";
- $link_text = scale_external_images($link_text);
+ $link_text = scale_external_images($link_text, true,
+ array($remote_photo_name, 'scaled_full_' . $remote_photo_name));
if(strpos($parent_item['body'],$link_text) === false) {
$r = q("update item set `body` = '%s', `visible` = 1 where `id` = %d and `uid` = %d limit 1",
@@ -2251,7 +2252,6 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
$relay_retract = true;
$target_type = ( ($item['verb'] === ACTIVITY_LIKE) ? 'Like' : 'Comment');
- $sender_signed_text = $item['guid'] . ';' . $target_type ;
$sql_sign_id = 'retract_iid';
$tpl = get_markup_template('diaspora_relayable_retraction.tpl');
@@ -2262,13 +2262,10 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
$target_type = 'Post';
// $positive = (($item['deleted']) ? 'false' : 'true');
$positive = 'true';
- $sender_signed_text = $item['guid'] . ';' . $target_type . ';' . $parent_guid . ';' . $positive . ';' . $myaddr;
$tpl = get_markup_template('diaspora_like_relay.tpl');
}
else { // item is a comment
- $sender_signed_text = $item['guid'] . ';' . $parent_guid . ';' . $text . ';' . $myaddr;
-
$tpl = get_markup_template('diaspora_comment_relay.tpl');
}
@@ -2294,6 +2291,13 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
return;
}
+ if($relay_retract)
+ $sender_signed_text = $item['guid'] . ';' . $target_type;
+ elseif($like)
+ $sender_signed_text = $item['guid'] . ';' . $target_type . ';' . $parent_guid . ';' . $positive . ';' . $handle;
+ else
+ $sender_signed_text = $item['guid'] . ';' . $parent_guid . ';' . $text . ';' . $handle;
+
// Sign the relayable with the top-level owner's signature
//
// We'll use the $sender_signed_text that we just created, instead of the $signed_text