From 11a22dcc3c4a91f95cd61adbce6a322b7f2e143f Mon Sep 17 00:00:00 2001 From: Cameron Ball Date: Fri, 28 Dec 2018 23:28:47 +0800 Subject: [PATCH] array_diff cares about the order... :\ --- src/purjolok.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/purjolok.php b/src/purjolok.php index 661e6cf..047e615 100644 --- a/src/purjolok.php +++ b/src/purjolok.php @@ -71,7 +71,7 @@ if ($between = between(reveal($message ?? ''), '[taskid]')) { 'sticker' => 'CAADBQADOgAD__7RBxFhadMBV3g5Ag' ]); - if (!array_diff($completedTasks, $tasksForTheWeek)) { + if (!array_diff($tasksForTheWeek, $completedTasks)) { getTelegram()->sendMessage([ 'chat_id' => $chatid, 'text' => getString('heyTasksAllCompleted') @@ -299,7 +299,7 @@ getTelegram()->addCommand( $completedTasks = file_exists($completedTasksFile) ? lines(trim(file_get_contents($completedTasksFile))) : []; - if (!array_diff($completedTasks, $tasksForTheWeek)) { + if (!array_diff($tasksForTheWeek, $completedTasks)) { $this->replyWithMessage([ 'text' => getString('tasksAllCompleted') ]); -- 2.11.0