Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable setAutoArchiveDuration + isWeekend check #333

Merged
merged 3 commits into from
Jan 28, 2025

Conversation

zuuring
Copy link
Member

@zuuring zuuring commented Dec 12, 2024

Notes

Let's re-enable the setAutoArchiveDuration to 24 hours / OneDay after the initial warning message is sent. This one also adds a isWeekend check so that we don't send thread decision reminders during the weekend days.

### Notes
Let's re-enable the `setAutoArchiveDuration` to 24 hours / `OneDay` after the initial warning message is sent.
@zuuring zuuring requested a review from Shadowfiend December 12, 2024 09:13
This checks whether it's `isWeekend` before running the thread status, if it is we return.
@zuuring zuuring changed the title Re-enable setAutoArchiveDuration on thread decisions Re-enable setAutoArchiveDuration + isWeekend check Dec 16, 2024
Copy link
Contributor

@Shadowfiend Shadowfiend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, everyone take a deep breath… Here we go lol.

ThreadAutoArchiveDuration.OneDay

// Let's grab if it's the weekend, 0 = sunday, 6 = saturday
const isWeekend = (): boolean => [0, 6].includes(new Date().getDay())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also thinking about holidays here, rough stuff. I wonder if we avoid Mondays as well for that reason 🤔

@Shadowfiend Shadowfiend merged commit 35e6bd1 into main Jan 28, 2025
7 checks passed
@Shadowfiend Shadowfiend deleted the add-autoarchivetime-threads branch January 28, 2025 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants