projects
/
SonOfLokstallBot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b07f069
)
array_diff cares about the order... :\
author
Cameron Ball
<cameron@cameron1729.xyz>
Fri, 28 Dec 2018 15:28:47 +0000
(23:28 +0800)
committer
Cameron Ball
<cameron@cameron1729.xyz>
Fri, 4 Jan 2019 20:47:20 +0000
(
04:47
+0800)
src/purjolok.php
patch
|
blob
|
history
diff --git
a/src/purjolok.php
b/src/purjolok.php
index
661e6cf
..
047e615
100644
(file)
--- a/
src/purjolok.php
+++ b/
src/purjolok.php
@@
-71,7
+71,7
@@
if ($between = between(reveal($message ?? ''), '[taskid]')) {
'sticker' => 'CAADBQADOgAD__7RBxFhadMBV3g5Ag'
]);
'sticker' => 'CAADBQADOgAD__7RBxFhadMBV3g5Ag'
]);
- if (!array_diff($
completedTasks, $tasksForTheWeek
)) {
+ if (!array_diff($
tasksForTheWeek, $completedTasks
)) {
getTelegram()->sendMessage([
'chat_id' => $chatid,
'text' => getString('heyTasksAllCompleted')
getTelegram()->sendMessage([
'chat_id' => $chatid,
'text' => getString('heyTasksAllCompleted')
@@
-299,7
+299,7
@@
getTelegram()->addCommand(
$completedTasks = file_exists($completedTasksFile) ? lines(trim(file_get_contents($completedTasksFile))) : [];
$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')
]);
$this->replyWithMessage([
'text' => getString('tasksAllCompleted')
]);