Skip to content

Commit ed26c87

Browse files
authored
Remove links if there are too many tasks
1 parent a1f4a8a commit ed26c87

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/reminders/messages/simpleTaskReportMessage.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export const simpleTaskReportMessage = async ({
2323
!hasUrgent && !hasUnassigned
2424
? "Nothing urgent or unassigned today! 🐀🥂"
2525
: "Check out all upcoming tasks [here.](https://github.com/orgs/CarletonComputerScienceSociety/projects/18) 👀";
26-
26+
const urgentItemsLinkThreshold = 5
27+
const urgentItemsLinkBool = urgentItems.length <= urgentItemsLinkThreshold
2728
return {
2829
title: `Daily Task Reminder ${randomEmoji}`,
2930
message: `${baseMessage}\n\n💡 **Fun Fact**: ${randomFact}.`,
@@ -33,7 +34,7 @@ export const simpleTaskReportMessage = async ({
3334
{
3435
title: "🔥 Urgent & Overdue",
3536
items: urgentItems,
36-
includeLinks: true,
37+
includeLinks: urgentItemsLinkBool,
3738
},
3839
]
3940
: []),

0 commit comments

Comments
 (0)