Merge pull request #9180 from redmatrix/develop

allow forum delivery using attached mention tags
This commit is contained in:
Hypolite Petovan 2020-09-12 12:30:47 -04:00 committed by GitHub
commit f1a0ed7740
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,6 +29,7 @@ use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Core\Session;
use Friendica\Core\System;
use Friendica\Model\Tag;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
use Friendica\Database\DBStructure;
@ -2670,6 +2671,16 @@ class Item
}
}
if (!$mention) {
$tags = Tag::getByURIId($item['uri-id'], [Tag::MENTION, Tag::EXCLUSIVE_MENTION]);
foreach ($tags as $tag) {
if (Strings::compareLink($link, $tag['url']) || Strings::compareLink($dlink, $tag['url'])) {
$mention = true;
DI::logger()->info('mention found in tag.', ['url' => $tag['url']]);
}
}
}
if (!$mention) {
if (($community_page || $prvgroup) &&
!$item['wall'] && !$item['origin'] && ($item['gravity'] == GRAVITY_PARENT)) {