We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1bb2928 commit 670f7cdCopy full SHA for 670f7cd
backend/src/cronjobs/ghostmode-reminder.cron.ts
@@ -77,11 +77,15 @@ export class GhostModeReminderCronJob {
77
const users = await this.userRepository
78
.createQueryBuilder("user")
79
.where("user.dateMode = :mode", { mode: EDateMode.GHOST })
80
- .andWhere("user.lastDateModeChange <= :timestamp", {
81
- timestamp: new Date(
82
- now.getTime() - intervalHour.hours * 60 * 60 * 1000,
83
- ),
84
- })
+ .andWhere(
+ "user.lastDateModeChange IS NULL OR user.lastDateModeChange <= :timestamp",
+ {
+ timestamp: new Date(
+ now.getTime() -
85
+ intervalHour.hours * 60 * 60 * 1000,
86
+ ),
87
+ },
88
+ )
89
.andWhere(
90
"user.lastDateModeReminderSent IS NULL OR user.lastDateModeReminderSent < :reminderTimestamp",
91
{
0 commit comments