1
0
Fork 0
This commit is contained in:
Michael 2020-01-05 12:00:15 +00:00
parent 6cbfa5b862
commit 23b73854a1

View file

@ -141,7 +141,7 @@ class UserItem
$profiles[] = $owner['url'];
// Notifications from Diaspora are often with an URL in the Diaspora format
$profiles[] = DI::baseUrl().'/u/'.$user['nickname'];
$profiles[] = DI::baseUrl() . '/u/' . $user['nickname'];
$profiles2 = [];
@ -204,7 +204,7 @@ 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['tag'], '=' . $profile.']') || strpos($item['body'], '=' . $profile . ']')) {
if (strpos($item['body'], $profile) === false) {
return true;
}
@ -223,7 +223,7 @@ 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['tag'], '=' . $profile.']') || strpos($item['body'], '=' . $profile . ']')) {
if (!(strpos($item['body'], $profile) === false)) {
return true;
}