diff options
author | Mario Vavti <mario@mariovavti.com> | 2024-11-10 11:49:09 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2024-11-10 11:49:09 +0100 |
commit | 43acb86aabdafd70354887a8ffbf836c12d9a69d (patch) | |
tree | fa23806372316c86049c7b0212a62dd1e195aa85 /include | |
parent | e339fbcc464ee2cc2b6caa8e456ca59606828906 (diff) | |
download | volse-hubzilla-43acb86aabdafd70354887a8ffbf836c12d9a69d.tar.gz volse-hubzilla-43acb86aabdafd70354887a8ffbf836c12d9a69d.tar.bz2 volse-hubzilla-43acb86aabdafd70354887a8ffbf836c12d9a69d.zip |
fix encoding and attribution
Diffstat (limited to 'include')
-rw-r--r-- | include/photos.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/photos.php b/include/photos.php index fe1a500d6..390754f39 100644 --- a/include/photos.php +++ b/include/photos.php @@ -406,7 +406,7 @@ function photo_upload($channel, $observer, $args) { } } - $attribution = (($visitor) ? $visitor : $channel['xchan_url']); + $attribution = (($visitor) ? $visitor : channel_url($channel)); //// Create item object $object = [ @@ -457,7 +457,7 @@ function photo_upload($channel, $observer, $args) { $target = [ 'id' => str_replace('/item/', '/conversation/', $item['mid']), 'type' => 'Collection', - 'attributedTo' => channel_url($channel), + 'attributedTo' => $attribution, ]; $item['body'] = $summary; @@ -466,10 +466,10 @@ function photo_upload($channel, $observer, $args) { $object['id'] = $item['mid']; $object['diaspora:guid'] = $item['uuid']; - $item['obj'] = json_encode($object); + $item['obj'] = $object; $item['tgt_type'] = 'Collection'; - $item['target'] = json_encode($target); + $item['target'] = $target; if ($post_tags) { $arr['term'] = $post_tags; } @@ -513,7 +513,7 @@ function photo_upload($channel, $observer, $args) { $target = [ 'id' => z_root() . '/conversation/' . $uuid, 'type' => 'Collection', - 'attributedTo' => channel_url($channel), + 'attributedTo' => $attribution, ]; $arr = [ |