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

This commit is contained in:
nobody 2021-05-11 17:30:16 -07:00
commit cb4b9e4b85
2 changed files with 8 additions and 3 deletions

View file

@ -180,7 +180,8 @@ class ActivityStreams {
$fields = [ 'to', 'cc', 'bto', 'bcc', 'audience'];
foreach ($fields as $f) {
$y = $this->get_compound_property($f, $base, $namespace);
// don't expand these yet
$y = $this->get_property_obj($f, $base, $namespace);
if ($y) {
if (! is_array($this->raw_recips)) {
$this->raw_recips = [];
@ -308,7 +309,7 @@ class ActivityStreams {
* @return NULL|mixed
*/
function fetch_property($url,$channel = null,$hub = null) {
function fetch_property($url,$channel = null,$hub = null) {
return Activity::fetch($url,$channel,$hub);
}

View file

@ -2874,7 +2874,11 @@ function tgroup_check($uid, $item) {
}
if ($item['mid'] === $item['parent_mid'] && (! intval($item['item_wall'])) && (strpos($item['tgt_type'],'Collection') !== false) && $item['target']) {
return true;
// accept posts to collections only if the collection belongs to us
if ((is_string($item['target']) && strpos($item['target'],z_root()) !== false)
|| (isset($item['target']['id']) && strpos($item['target']['id'],z_root()) !== false)) {
return true;
}
}
if (get_pconfig($uid,'system','post_via_mentions',in_array($role, ['forum','forum_moderated'])) && i_am_mentioned($u,$item)) {