aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-12-15 15:01:54 -0800
committerredmatrix <redmatrix@redmatrix.me>2015-12-15 15:01:54 -0800
commit2924b9182e787d0266e433169b1db1c3fdd359a7 (patch)
treef0125fa6cd46a0147301af27d91031bfcdd45d55 /include/items.php
parentba463afbdcded70b88a48d76276d837a7e78ef0c (diff)
downloadvolse-hubzilla-2924b9182e787d0266e433169b1db1c3fdd359a7.tar.gz
volse-hubzilla-2924b9182e787d0266e433169b1db1c3fdd359a7.tar.bz2
volse-hubzilla-2924b9182e787d0266e433169b1db1c3fdd359a7.zip
revise the photo activity a bit so that we always have a valid activity body. Several network connectors can get empty posts or posts that don't contain any reference whatsoever to the actual photo. Since this can cause duplicate images on our own site, just provide the activity summary and any included body text to the activity by default. Provide a function to enhance this activity with an actual photo which can be applied on demand for any network connectors that desire it. Otherwise they'll just get a link to the photo in the activity statement - which is better than an empty post. Have applied this "add actual photo to the post" function to both Diaspora and RSS feeds. Also provide the album as the activity target.
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php10
1 files changed, 1 insertions, 9 deletions
diff --git a/include/items.php b/include/items.php
index 4d49a5191..7343f7165 100755
--- a/include/items.php
+++ b/include/items.php
@@ -3950,15 +3950,7 @@ function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) {
return '<at:deleted-entry ref="' . xmlify($item['mid']) . '" when="' . xmlify(datetime_convert('UTC','UTC',$item['edited'] . '+00:00',ATOM_TIME)) . '" />' . "\r\n";
- // since November 2015 linked photo items don't or at least may not have a body. Recreate one.
-
- if(($item['verb'] === ACTIVITY_POST) && ($item['obj_type'] === ACTIVITY_OBJ_PHOTO) && (! trim($item['body']))) {
- $j = json_decode($item['object'],true);
- if($j) {
- $item['body'] = $j['bbcode'];
- $item['sig'] = '';
- }
- }
+ create_export_photo_body($item);
if($item['allow_cid'] || $item['allow_gid'] || $item['deny_cid'] || $item['deny_gid'])
$body = fix_private_photos($item['body'],$owner['uid'],$item,$cid);