fix wrong logic

This commit is contained in:
Mario Vavti
2025-04-18 21:19:38 +02:00
parent a4a7794315
commit d7aff9a4dd
3 changed files with 8 additions and 8 deletions

View File

@@ -44,7 +44,7 @@ class MessageFilter {
}
elseif (str_starts_with($word, 'until=')) {
$until = strtotime(trim(substr($word, 6)));
if ($until < strtotime($item['created'])) {
if ($until > strtotime($item['created'])) {
return false;
}
}
@@ -98,7 +98,7 @@ class MessageFilter {
}
elseif (str_starts_with($word, 'until=')) {
$until = strtotime(trim(substr($word, 6)));
if ($until < strtotime($item['created'])) {
if ($until > strtotime($item['created'])) {
return true;
}
}

View File

@@ -77,22 +77,22 @@ class MessageFilterTest extends UnitTestCase {
'until=2025-04-18 20:49:00 in excl' => [
'',
'until=2025-04-18 20:49:00',
false
true
],
'until=2025-04-18 20:51:00 in excl' => [
'',
'until=2025-04-18 20:51:00',
true
false
],
'until=2025-04-18 20:49:00 in incl' => [
'until=2025-04-18 20:49:00',
'',
true
false
],
'until=2025-04-18 20:51:00 in incl' => [
'until=2025-04-18 20:51:00',
'',
false
true
],
'hashtag in incl' => [
'#grasshopper',

View File

@@ -3,7 +3,7 @@
'name' => 'zotlabs/hubzilla',
'pretty_version' => 'dev-10.2RC',
'version' => 'dev-10.2RC',
'reference' => 'c1d87fa65d6e2b65e0601b75772b98cf745c39dd',
'reference' => 'a4a7794315538fc840cc002f9823fd8107d345bd',
'type' => 'application',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -430,7 +430,7 @@
'zotlabs/hubzilla' => array(
'pretty_version' => 'dev-10.2RC',
'version' => 'dev-10.2RC',
'reference' => 'c1d87fa65d6e2b65e0601b75772b98cf745c39dd',
'reference' => 'a4a7794315538fc840cc002f9823fd8107d345bd',
'type' => 'application',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),