Issue 11309: Check if a post is wanted

This commit is contained in:
Michael 2022-03-11 14:00:05 +00:00
parent e3025c2c15
commit f264923cad
3 changed files with 56 additions and 6 deletions

View file

@ -1775,12 +1775,11 @@ class DFRN
{
if (DBA::exists('contact', ["`nurl` = ? AND `uid` != ? AND `rel` IN (?, ?)",
Strings::normaliseLink($item["author-link"]), 0, Contact::FRIEND, Contact::SHARING])) {
Logger::info('Author has got followers - accepted', ['uri' => $item['uri'], 'author' => $item["author-link"]]);
Logger::debug('Author has got followers - accepted', ['uri' => $item['uri'], 'author' => $item["author-link"]]);
return true;
}
$taglist = Tag::getByURIId($item['uri-id'], [Tag::HASHTAG]);
$tags = array_column($taglist, 'name');
$tags = array_column(Tag::getByURIId($item['uri-id'], [Tag::HASHTAG]), 'name');
return Relay::isSolicitedPost($tags, $item['body'], $item['author-id'], $item['uri'], Protocol::DFRN);
}