mirror of
https://github.com/friendica/friendica
synced 2025-04-26 13:50:11 +00:00
The old tag handling is removed
This commit is contained in:
parent
92cf4879e5
commit
b0cb6536dd
14 changed files with 40 additions and 543 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue