Skip empty name tags in ActivityPub\Processor::acceptIncomingMessage
- Address part of https://github.com/friendica/friendica/issues/12011#issuecomment-1826792949pull/13672/head
parent
332ab6641c
commit
838c73cbba
|
@ -1725,7 +1725,7 @@ class Processor
|
||||||
$tags = Receiver::processTags(JsonLD::fetchElementArray($activity['as:object'], 'as:tag') ?? []);
|
$tags = Receiver::processTags(JsonLD::fetchElementArray($activity['as:object'], 'as:tag') ?? []);
|
||||||
if (!empty($tags)) {
|
if (!empty($tags)) {
|
||||||
foreach ($tags as $tag) {
|
foreach ($tags as $tag) {
|
||||||
if (($tag['type'] != 'Hashtag') && !strpos($tag['type'], ':Hashtag')) {
|
if (($tag['type'] != 'Hashtag') && !strpos($tag['type'], ':Hashtag') || empty($tag['name'])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$messageTags[] = ltrim(mb_strtolower($tag['name']), '#');
|
$messageTags[] = ltrim(mb_strtolower($tag['name']), '#');
|
||||||
|
|
Loading…
Reference in New Issue