From d7aff9a4dd30a624a724edd638e41cf66add9b6b Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 18 Apr 2025 21:19:38 +0200 Subject: [PATCH] fix wrong logic --- Zotlabs/Lib/MessageFilter.php | 4 ++-- tests/unit/Lib/MessageFilterTest.php | 8 ++++---- vendor/composer/installed.php | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Zotlabs/Lib/MessageFilter.php b/Zotlabs/Lib/MessageFilter.php index c07de75ab..da7181f78 100644 --- a/Zotlabs/Lib/MessageFilter.php +++ b/Zotlabs/Lib/MessageFilter.php @@ -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; } } diff --git a/tests/unit/Lib/MessageFilterTest.php b/tests/unit/Lib/MessageFilterTest.php index ad7d2cc4d..e1b6d8476 100644 --- a/tests/unit/Lib/MessageFilterTest.php +++ b/tests/unit/Lib/MessageFilterTest.php @@ -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', diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 370058c91..f96718034 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -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(),