Merge branch 'dev' of /home/macgirvin/z into dev

This commit is contained in:
nobody 2021-06-11 16:09:31 -07:00
commit 1a2d4288d4
2 changed files with 12 additions and 8 deletions

View file

@ -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' ) ";

View file

@ -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