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

This commit is contained in:
nobody 2021-06-11 16:10:04 -07:00
commit 166edf201c
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); $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($item_id),
dbesc(z_root() . '/activity/' . $item_id) dbesc(z_root() . '/activity/' . $item_id),
dbesc(z_root() . '/item/' . $item_id)
); );
if (! $r) { 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($item_id),
dbesc(z_root() . '/activity/' . $item_id) dbesc(z_root() . '/activity/' . $item_id),
dbesc(z_root() . '/item/' . $item_id)
); );
if ($r) { if ($r) {
@ -107,8 +109,9 @@ class Activity extends Controller {
$item_id = argv(1); $item_id = argv(1);
if (! $item_id) if (! $item_id) {
http_status_exit(404, 'Not found'); http_status_exit(404, 'Not found');
}
$portable_id = EMPTY_STR; $portable_id = EMPTY_STR;

View file

@ -3055,8 +3055,9 @@ function start_delivery_chain($channel, $item, $item_id, $parent, $group = false
} }
else { else {
$arr['mid'] = str_replace('/item/','/activity/',item_message_id()); $arr['mid'] = item_message_id();
$arr['parent_mid'] = $arr['mid']; $arr['parent_mid'] = $arr['mid'];
IConfig::Set($arr,'activitypub','context', str_replace('/item/','/conversation/',$arr['mid']));
} }
$arr['aid'] = $channel['channel_account_id']; $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 * @param object $obj
* @return array * @return array