mirror of
https://github.com/friendica/friendica
synced 2024-11-10 04:22:54 +00:00
SImplify code
This commit is contained in:
parent
b081227b47
commit
22952f88ca
1 changed files with 6 additions and 8 deletions
|
@ -702,15 +702,13 @@ class Transmitter
|
|||
}
|
||||
|
||||
foreach (['to' => Tag::TO, 'cc' => Tag::CC, 'bcc' => Tag::BCC] as $element => $type) {
|
||||
if (!empty($receivers[$element])) {
|
||||
foreach ($receivers[$element] as $receiver) {
|
||||
if ($receiver == ActivityPub::PUBLIC_COLLECTION) {
|
||||
$name = Receiver::PUBLIC_COLLECTION;
|
||||
} else {
|
||||
$name = trim(parse_url($receiver, PHP_URL_PATH), '/');
|
||||
}
|
||||
Tag::store($item['uri-id'], $type, $name, $receiver);
|
||||
foreach ($receivers[$element] as $receiver) {
|
||||
if ($receiver == ActivityPub::PUBLIC_COLLECTION) {
|
||||
$name = Receiver::PUBLIC_COLLECTION;
|
||||
} else {
|
||||
$name = trim(parse_url($receiver, PHP_URL_PATH), '/');
|
||||
}
|
||||
Tag::store($item['uri-id'], $type, $name, $receiver);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue