mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-21 08:35:23 +00:00
Merge branch 'dev' of /home/macgirvin/roadhouse into dev
This commit is contained in:
commit
166edf201c
2 changed files with 12 additions and 8 deletions
|
@ -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,9 +109,10 @@ 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;
|
||||||
|
|
||||||
$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' ) ";
|
$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' ) ";
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue