diff --git a/Zotlabs/Module/Activity.php b/Zotlabs/Module/Activity.php index ce6a58b06..ee2634b92 100644 --- a/Zotlabs/Module/Activity.php +++ b/Zotlabs/Module/Activity.php @@ -67,15 +67,17 @@ class Activity extends Controller { $sql_extra = item_permissions_sql(0); } - $r = q("select * from item where ( uuid = '%s' or mid = '%s' ) $item_normal $sql_extra limit 1", + $r = q("select * from item where ( uuid = '%s' or mid = '%s' or mid = '%s' ) $item_normal $sql_extra limit 1", dbesc($item_id), - dbesc(z_root() . '/activity/' . $item_id) + dbesc(z_root() . '/activity/' . $item_id), + dbesc(z_root() . '/item/' . $item_id) ); if (! $r) { - $r = q("select * from item where ( uuid = '%s' or mid = '%s' ) $item_normal limit 1", + $r = q("select * from item where ( uuid = '%s' or mid = '%s' or mid = '%s' ) $item_normal limit 1", dbesc($item_id), - dbesc(z_root() . '/activity/' . $item_id) + dbesc(z_root() . '/activity/' . $item_id), + dbesc(z_root() . '/item/' . $item_id) ); if ($r) { @@ -107,9 +109,10 @@ class Activity extends Controller { $item_id = argv(1); - if (! $item_id) + if (! $item_id) { http_status_exit(404, 'Not found'); - + } + $portable_id = EMPTY_STR; $item_normal = " and item.item_hidden = 0 and item.item_type = 0 and item.item_unpublished = 0 and item.item_delayed = 0 and item.item_blocked = 0 and not verb in ( 'Follow', 'Ignore' ) "; diff --git a/include/items.php b/include/items.php index 354e8f07e..937747fa3 100644 --- a/include/items.php +++ b/include/items.php @@ -3055,8 +3055,9 @@ function start_delivery_chain($channel, $item, $item_id, $parent, $group = false } else { - $arr['mid'] = str_replace('/item/','/activity/',item_message_id()); + $arr['mid'] = item_message_id(); $arr['parent_mid'] = $arr['mid']; + IConfig::Set($arr,'activitypub','context', str_replace('/item/','/conversation/',$arr['mid'])); } $arr['aid'] = $channel['channel_account_id']; @@ -3341,7 +3342,7 @@ function compare_permissions($obj1,$obj2) { } /** - * @brief Returns an array of contact-ids that are allowed to see this object. + * @brief Returns an array of connection identifiers that are allowed to see this object. * * @param object $obj * @return array