The old tag handling is removed

This commit is contained in:
Michael 2020-05-02 05:08:05 +00:00
parent 92cf4879e5
commit b0cb6536dd
14 changed files with 40 additions and 543 deletions

View file

@ -227,9 +227,10 @@ class UserItem
*/
private static function checkImplicitMention(array $item, array $profiles)
{
foreach ($profiles AS $profile) {
if (strpos($item['tag'], '=' . $profile.']') || strpos($item['body'], '=' . $profile . ']')) {
if (strpos($item['body'], $profile) === false) {
$mentions = Tag::getByURIId($item['uri-id'], [Tag::IMPLICIT_MENTION]);
foreach ($mentions as $mention) {
foreach ($profiles as $profile) {
if (Strings::compareLink($profile, $mention['url'])) {
return true;
}
}
@ -246,9 +247,10 @@ class UserItem
*/
private static function checkExplicitMention(array $item, array $profiles)
{
foreach ($profiles AS $profile) {
if (strpos($item['tag'], '=' . $profile.']') || strpos($item['body'], '=' . $profile . ']')) {
if (!(strpos($item['body'], $profile) === false)) {
$mentions = Tag::getByURIId($item['uri-id'], [Tag::MENTION, Tag::EXCLUSIVE_MENTION]);
foreach ($mentions as $mention) {
foreach ($profiles as $profile) {
if (Strings::compareLink($profile, $mention['url'])) {
return true;
}
}