mirror of
https://github.com/friendica/friendica
synced 2025-01-18 16:24:27 +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_urls'] = self::getReceiverURL($object);
|
||||||
$object_data['receiver'] = $receivers;
|
$object_data['receiver'] = $receivers;
|
||||||
$object_data['reception_type'] = $reception_types;
|
$object_data['reception_type'] = $reception_types;
|
||||||
|
$object_data['unlisted'] = false;
|
||||||
|
|
||||||
if (!empty($object['pixelfed:capabilities'])) {
|
if (!empty($object['pixelfed:capabilities'])) {
|
||||||
$object_data['capabilities'] = self::getCapabilities($object);
|
$object_data['capabilities'] = self::getCapabilities($object);
|
||||||
}
|
}
|
||||||
|
|
||||||
$object_data['unlisted'] = in_array(-1, $object_data['receiver']);
|
if (in_array(-1, $object_data['receiver'])) {
|
||||||
|
$object_data['unlisted'] = true;
|
||||||
if (array_key_exists(-1, $object_data['receiver'])) {
|
|
||||||
unset($object_data['receiver'][-1]);
|
unset($object_data['receiver'][-1]);
|
||||||
}
|
|
||||||
|
|
||||||
if (array_key_exists(-1, $object_data['reception_type'])) {
|
|
||||||
unset($object_data['reception_type'][-1]);
|
unset($object_data['reception_type'][-1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue