diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-12-14 17:58:39 -0800 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-12-14 17:58:39 -0800 |
commit | 49108c230b4d3a4aac74f2139ccc23019be23e38 (patch) | |
tree | ee5bb9f6be344e8bfb4733c7c256bdeb58818bd8 /include/bb2diaspora.php | |
parent | b32bba47c8175bd791f9b5e512ff8c9e16a8f01a (diff) | |
download | volse-hubzilla-49108c230b4d3a4aac74f2139ccc23019be23e38.tar.gz volse-hubzilla-49108c230b4d3a4aac74f2139ccc23019be23e38.tar.bz2 volse-hubzilla-49108c230b4d3a4aac74f2139ccc23019be23e38.zip |
regenerate the item body for linked photo items that now have no body to provide legal activities when going to other networks. Remove the signature since the signed text was an empty string and we've just replaced it with content that will not verify.
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r-- | include/bb2diaspora.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php index 1be7caa19..e2ce3f1b0 100644 --- a/include/bb2diaspora.php +++ b/include/bb2diaspora.php @@ -333,6 +333,17 @@ function bb2diaspora_itembody($item, $force_update = false) { } } + + // 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'] = ''; + } + } + $newitem = $item; if(array_key_exists('item_obscured',$item) && intval($item['item_obscured'])) { @@ -346,6 +357,7 @@ function bb2diaspora_itembody($item, $force_update = false) { } } + bb2diaspora_itemwallwall($newitem); $title = $newitem['title']; |