Skip to content

Commit

Permalink
Ensure Tag::getByURIId parameter value in OStatus;;entryFooter
Browse files Browse the repository at this point in the history
- Address friendica#8473 (comment)
- $item['uri-id'] isn't present for follow entry pseudo-items
  • Loading branch information
MrPetovan committed May 4, 2020
1 parent 05cac4c commit 340bc57
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Protocol/OStatus.php
Expand Up @@ -2081,11 +2081,9 @@ private static function entryFooter(DOMDocument $doc, $entry, array $item, array
XML::addElement($doc, $entry, "ostatus:conversation", $conversation_uri, $attributes);
}

$tags = Tag::getByURIId($item['uri-id']);
if (count($tags)) {
foreach ($tags as $tag) {
$mentioned[$tag['url']] = $tag['url'];
}
// uri-id isn't present for follow entry pseudo-items
foreach (Tag::getByURIId($item['uri-id'] ?? 0) as $tag) {
$mentioned[$tag['url']] = $tag['url'];
}

// Make sure that mentions are accepted (GNU Social has problems with mixing HTTP and HTTPS)
Expand Down

0 comments on commit 340bc57

Please sign in to comment.