Use getString instead of getStringAndCode since the keyboard is implemented now
authorCameron Ball <cameron@cameron1729.xyz>
Tue, 1 Jan 2019 13:35:09 +0000 (21:35 +0800)
committerCameron Ball <cameron@cameron1729.xyz>
Fri, 4 Jan 2019 20:47:20 +0000 (04:47 +0800)
src/purjolok.php
src/tasks.php
src/unfinished.php

index 8b823de..386596a 100644 (file)
@@ -267,7 +267,7 @@ getTelegram()->addCommand(
             $this->replyWithMessage([
                 'text' => ununlines([
                     getString('tasksForTheWeek'),
-                    unlines(map(getStringAndCode)(array_diff($tasksForTheWeek, $completedTasks)))
+                    unlines(map(getString)(array_diff($tasksForTheWeek, $completedTasks)))
                 ])
             ]);
         }
index 5b11cc2..eb37cc7 100644 (file)
@@ -14,9 +14,9 @@ $currentDayOfMonth = closest((new DateTimeImmutable())->format('d'), $mondays);
 $currentWeekOfMonth = closestIndex($currentDayOfMonth, $mondays) + 1;
 
 $taskLists = array_merge(
-    isStartOfSeason($currentMonth, $currentDayOfMonth) ? [unlines(map(getStringAndCode)(getTasksForTheSeason(getSeason($currentMonth), $taskMatrix)))] : [],
-    isStartOfMonth($currentDayOfMonth) ? [unlines(map(getStringAndCode)(getTasksForTheMonth($currentMonth, $taskMatrix)))] : [],
-    [unlines(map(getStringAndCode)(getTasksForTheWeek($currentWeekOfMonth, $currentMonth, $taskMatrix)))]
+    isStartOfSeason($currentMonth, $currentDayOfMonth) ? [unlines(map(getString)(getTasksForTheSeason(getSeason($currentMonth), $taskMatrix)))] : [],
+    isStartOfMonth($currentDayOfMonth) ? [unlines(map(getString)(getTasksForTheMonth($currentMonth, $taskMatrix)))] : [],
+    [unlines(map(getString)(getTasksForTheWeek($currentWeekOfMonth, $currentMonth, $taskMatrix)))]
 );
 
 $taskMessages = [
index de7b5b8..8c7369d 100644 (file)
@@ -49,10 +49,10 @@ $unfinishedForWeek = array_diff(
 //EOY => (EOM & EOW) & !EOSx
 //EOS => (EOM & EOW) & !EOY
 $taskLists = array_merge(
-    isEndOfYear($currentYear, $currentMonth, $currentDayOfMonth) ? [unlines(map(getStringAndCode)($unfinishedForYear))] : [],
-    isEndOfSeason($currentYear, $currentMonth, $currentDayOfMonth) ? [unlines(map(getStringAndCode)($unfinishedForSeason))] : [],
-    isEndOfMonth($currentYear, $currentMonth, $currentDayOfMonth) ? [unlines(map(getStringAndCode)($unfinishedForMonth))] : [],
-    [unlines(map(getStringAndCode)($unfinishedForWeek))]
+    isEndOfYear($currentYear, $currentMonth, $currentDayOfMonth) ? [unlines(map(getString)($unfinishedForYear))] : [],
+    isEndOfSeason($currentYear, $currentMonth, $currentDayOfMonth) ? [unlines(map(getString)($unfinishedForSeason))] : [],
+    isEndOfMonth($currentYear, $currentMonth, $currentDayOfMonth) ? [unlines(map(getString)($unfinishedForMonth))] : [],
+    [unlines(map(getString)($unfinishedForWeek))]
 );
 
 $seasonName = ucfirst($currentSeason);