Merge branch 'develop' into phpstan-level-3

This commit is contained in:
Art4 2025-02-27 12:48:40 +00:00
commit c72d2d44c6
34 changed files with 1044 additions and 446 deletions

View file

@ -10,10 +10,10 @@ namespace Friendica\Object;
use Friendica\Content\ContactSelector;
use Friendica\Content\Feature;
use Friendica\Core\Addon;
use Friendica\Core\Hook;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\DI;
use Friendica\Event\ArrayFilterEvent;
use Friendica\Model\Contact;
use Friendica\Model\Conversation;
use Friendica\Model\Item;
@ -314,8 +314,14 @@ class Post
$sparkle = ' sparkle';
}
$eventDispatcher = DI::eventDispatcher();
$locate = ['location' => $item['location'], 'coord' => $item['coord'], 'html' => ''];
Hook::callAll('render_location', $locate);
$locate = $eventDispatcher->dispatch(
new ArrayFilterEvent(ArrayFilterEvent::RENDER_LOCATION, $locate),
)->getArray();
$location_html = $locate['html'] ?: Strings::escapeHtml($locate['location'] ?: $locate['coord'] ?: '');
// process action responses - e.g. like/dislike/attend/agree/whatever
@ -631,7 +637,10 @@ class Post
];
$arr = ['item' => $item, 'output' => $tmp_item];
Hook::callAll('display_item', $arr);
$arr = $eventDispatcher->dispatch(
new ArrayFilterEvent(ArrayFilterEvent::DISPLAY_ITEM, $arr),
)->getArray();
$result = $arr['output'];