mirror of
https://github.com/friendica/friendica
synced 2024-12-22 18:00:16 +00:00
Improve check for unlisted receiver
This commit is contained in:
parent
12d5e4da44
commit
9a04f90bbd
1 changed files with 3 additions and 6 deletions
|
@ -1890,18 +1890,15 @@ class Receiver
|
|||
$object_data['receiver_urls'] = self::getReceiverURL($object);
|
||||
$object_data['receiver'] = $receivers;
|
||||
$object_data['reception_type'] = $reception_types;
|
||||
$object_data['unlisted'] = false;
|
||||
|
||||
if (!empty($object['pixelfed:capabilities'])) {
|
||||
$object_data['capabilities'] = self::getCapabilities($object);
|
||||
}
|
||||
|
||||
$object_data['unlisted'] = in_array(-1, $object_data['receiver']);
|
||||
|
||||
if (array_key_exists(-1, $object_data['receiver'])) {
|
||||
if (in_array(-1, $object_data['receiver'])) {
|
||||
$object_data['unlisted'] = true;
|
||||
unset($object_data['receiver'][-1]);
|
||||
}
|
||||
|
||||
if (array_key_exists(-1, $object_data['reception_type'])) {
|
||||
unset($object_data['reception_type'][-1]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue