aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2024-11-10 11:49:09 +0100
committerMario Vavti <mario@mariovavti.com>2024-11-10 11:49:09 +0100
commit43acb86aabdafd70354887a8ffbf836c12d9a69d (patch)
treefa23806372316c86049c7b0212a62dd1e195aa85 /include
parente339fbcc464ee2cc2b6caa8e456ca59606828906 (diff)
downloadvolse-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.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 = [