This commit is contained in:
Michael 2020-01-05 12:00:15 +00:00
parent 6cbfa5b862
commit 23b73854a1
1 changed files with 3 additions and 3 deletions

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;
}