Merge remote-tracking branch 'upstream/2023.09-rc' into channel-settings

This commit is contained in:
Michael 2023-12-03 14:41:58 +00:00
commit 8386768708
5 changed files with 7 additions and 11 deletions

View file

@ -122,8 +122,8 @@ class Statuses extends BaseApi
$existing_media = array_column(Post\Media::getByURIId($post['uri-id'], [Post\Media::AUDIO, Post\Media::VIDEO, Post\Media::IMAGE]), 'id'); $existing_media = array_column(Post\Media::getByURIId($post['uri-id'], [Post\Media::AUDIO, Post\Media::VIDEO, Post\Media::IMAGE]), 'id');
foreach ($request['media_attributes'] as $attributes) { foreach ($request['media_attributes'] as $attributes) {
if (in_array($attributes['id'], $existing_media)) { if (!empty($attributes['id']) && in_array($attributes['id'], $existing_media)) {
Post\Media::updateById(['description' => $attributes['description']], $attributes['id']); Post\Media::updateById(['description' => $attributes['description'] ?? null], $attributes['id']);
} }
} }
@ -227,7 +227,7 @@ class Statuses extends BaseApi
break; break;
} }
} }
if (!empty($owner['allow_cid'] . $owner['allow_gid'] . $owner['deny_cid'] . $owner['deny_gid'])) { if (!empty($owner['allow_cid'] . $owner['allow_gid'] . $owner['deny_cid'] . $owner['deny_gid'])) {
$item['allow_cid'] = $owner['allow_cid']; $item['allow_cid'] = $owner['allow_cid'];
$item['allow_gid'] = $owner['allow_gid']; $item['allow_gid'] = $owner['allow_gid'];
@ -306,7 +306,7 @@ class Statuses extends BaseApi
} }
$item = DI::contentItem()->expandTags($item, $request['visibility'] == 'direct'); $item = DI::contentItem()->expandTags($item, $request['visibility'] == 'direct');
if (!empty($request['media_ids'])) { if (!empty($request['media_ids'])) {
$item = $this->storeMediaIds($request['media_ids'], $item); $item = $this->storeMediaIds($request['media_ids'], $item);
} }

View file

@ -115,7 +115,7 @@ class Channel extends Timeline
$this->page['aside'] .= Widget::accountTypes('channel/' . $this->selectedTab, $this->accountTypeString); $this->page['aside'] .= Widget::accountTypes('channel/' . $this->selectedTab, $this->accountTypeString);
if (!in_array($this->selectedTab, [ChannelEntity::FOLLOWERS, ChannelEntity::FORYOU]) && $this->config->get('system', 'community_no_sharer')) { if (!in_array($this->selectedTab, [ChannelEntity::FOLLOWERS, ChannelEntity::FORYOU])) {
$this->page['aside'] .= $this->getNoSharerWidget('channel'); $this->page['aside'] .= $this->getNoSharerWidget('channel');
} }

View file

@ -106,7 +106,7 @@ class Community extends Timeline
$this->page['aside'] .= Widget::accountTypes('community/' . $this->selectedTab, $this->accountTypeString); $this->page['aside'] .= Widget::accountTypes('community/' . $this->selectedTab, $this->accountTypeString);
if ($this->session->getLocalUserId() && $this->config->get('system', 'community_no_sharer')) { if ($this->session->getLocalUserId()) {
$this->page['aside'] .= $this->getNoSharerWidget('community'); $this->page['aside'] .= $this->getNoSharerWidget('community');
} }

View file

@ -1213,7 +1213,7 @@ class Receiver
} }
// Fetch the receivers for the public and the followers collection // Fetch the receivers for the public and the followers collection
if ((($receiver == $followers) || (($receiver == self::PUBLIC_COLLECTION) && !$isGroup) || ($isGroup && ($element == 'as:audience'))) && !empty($actor)) { if ((($receiver == $followers) || (($receiver == self::PUBLIC_COLLECTION) && !$isGroup) || ($isGroup && ($element == 'as:audience'))) && !empty($profile)) {
$receivers = self::getReceiverForActor($tags, $receivers, $follower_target, $profile); $receivers = self::getReceiverForActor($tags, $receivers, $follower_target, $profile);
continue; continue;
} }

View file

@ -140,10 +140,6 @@ return [
// Deny public access to the local user directory. // Deny public access to the local user directory.
'block_local_dir' => false, 'block_local_dir' => false,
// community_no_sharer (Boolean)
// Don't display sharing accounts on the global community
'community_no_sharer' => false,
// contact_update_limit (Integer) // contact_update_limit (Integer)
// How many contacts should be checked at a time? // How many contacts should be checked at a time?
'contact_update_limit' => 100, 'contact_update_limit' => 100,