mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update Inbox, cast live filters to lowercase
This commit is contained in:
parent
66f6640072
commit
d835e0adaa
2 changed files with 4 additions and 4 deletions
|
@ -321,11 +321,11 @@ class Helpers {
|
||||||
$filters = array_map('trim', explode(',', $filters));
|
$filters = array_map('trim', explode(',', $filters));
|
||||||
$content = $res['content'];
|
$content = $res['content'];
|
||||||
foreach($filters as $filter) {
|
foreach($filters as $filter) {
|
||||||
$filter = trim($filter);
|
$filter = trim(strtolower($filter));
|
||||||
if(!$filter || !strlen($filter)) {
|
if(!$filter || !strlen($filter)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(str_contains($content, $filter)) {
|
if(str_contains(strtolower($content), $filter)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,11 +203,11 @@ class Inbox
|
||||||
$filters = array_map('trim', explode(',', $filters));
|
$filters = array_map('trim', explode(',', $filters));
|
||||||
$content = $activity['content'];
|
$content = $activity['content'];
|
||||||
foreach($filters as $filter) {
|
foreach($filters as $filter) {
|
||||||
$filter = trim($filter);
|
$filter = trim(strtolower($filter));
|
||||||
if(!$filter || !strlen($filter)) {
|
if(!$filter || !strlen($filter)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(str_contains($content, $filter)) {
|
if(str_contains(strtolower($content), $filter)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue