aboutsummaryrefslogtreecommitdiffstats
path: root/include/photos.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/photos.php')
-rw-r--r--include/photos.php10
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 = [