aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-02-25 19:29:50 +0000
committerMario <mario@mariovavti.com>2024-02-25 19:29:50 +0000
commit3dd739424718596b94f5a61d2015388db2491999 (patch)
tree336e19816349b7b0c3d5c4ba49bf4bf19ae4e46a /include/text.php
parentb860b730a9fe718ad35cd918ab237afe42cf386c (diff)
downloadvolse-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.php6
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']);