diff options
author | Mario <mario@mariovavti.com> | 2024-02-25 19:29:50 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-02-25 19:29:50 +0000 |
commit | 3dd739424718596b94f5a61d2015388db2491999 (patch) | |
tree | 336e19816349b7b0c3d5c4ba49bf4bf19ae4e46a /include/text.php | |
parent | b860b730a9fe718ad35cd918ab237afe42cf386c (diff) | |
download | volse-hubzilla-3dd739424718596b94f5a61d2015388db2491999.tar.gz volse-hubzilla-3dd739424718596b94f5a61d2015388db2491999.tar.bz2 volse-hubzilla-3dd739424718596b94f5a61d2015388db2491999.zip |
AS2
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/text.php b/include/text.php index 052c26594..ea9cf45e1 100644 --- a/include/text.php +++ b/include/text.php @@ -1776,7 +1776,7 @@ function prepare_body(&$item,$attach = false,$opts = false) { $s = ''; $photo = ''; - $is_photo = ((($item['verb'] === ACTIVITY_POST) && ($item['obj_type'] === ACTIVITY_OBJ_PHOTO)) ? true : false); + $is_photo = (((in_array($item['verb'], ['Create', ACTIVITY_POST])) && (in_array($item['obj_type'], ['Image', ACTIVITY_OBJ_PHOTO]))) ? true : false); if ($is_photo) { $object = json_decode($item['obj'],true); @@ -1821,7 +1821,7 @@ function prepare_body(&$item,$attach = false,$opts = false) { } - $poll = (($item['obj_type'] === 'Question' && in_array($item['verb'],[ ACTIVITY_POST, ACTIVITY_UPDATE, ACTIVITY_SHARE ])) ? format_poll($item, $s, $opts) : false); + $poll = (($item['obj_type'] === 'Question' && in_array($item['verb'],['Create', ACTIVITY_POST, ACTIVITY_UPDATE, ACTIVITY_SHARE])) ? format_poll($item, $s, $opts) : false); if ($poll) { $s = $poll; } @@ -2120,7 +2120,7 @@ function prepare_text($text, $content_type = 'text/bbcode', $opts = false) { function create_export_photo_body(&$item) { - if(($item['verb'] === ACTIVITY_POST) && ($item['obj_type'] === ACTIVITY_OBJ_PHOTO)) { + if((in_array($item['verb'], ['Create', ACTIVITY_POST])) && (in_array($item['obj_type'], ['Image', ACTIVITY_OBJ_PHOTO]))) { $j = json_decode($item['obj'],true); if($j) { $item['body'] .= "\n\n" . (($j['body']) ? $j['body'] : $j['bbcode']); |