[AB-xxx] changing duration for reminder snooze, so that it doesnt add the duration _after_ the snooze again, the snooze is intended to be the duration at which the reminders start again

fixing message embed cleanup job not being able to deal with missing channels
This commit is contained in:
Sheldan
2026-04-26 22:56:50 +02:00
parent 52f6fd148e
commit 790cca7278
2 changed files with 19 additions and 8 deletions

View File

@@ -75,7 +75,7 @@ public class ModmailReminderListener implements ModmailThreadActionListener {
log.debug("Thread {} is closed - ignoring.", model.getThreadId());
return ModmailThreadActionListenerResult.IGNORED;
}
Instant timeStampToConsider = getTimestampToUse(thread);
Instant timeStampToConsider = getTimestampToUse(thread, duration);
boolean mustBeReminded = timeInPastDuration.isAfter(timeStampToConsider);
if (mustBeReminded) {
sendReminder(thread)
@@ -97,9 +97,9 @@ public class ModmailReminderListener implements ModmailThreadActionListener {
}
private static Instant getTimestampToUse(ModMailThread thread) {
private static Instant getTimestampToUse(ModMailThread thread, Duration configuredDuration) {
if (thread.getRemindersSnoozedUntil() != null) {
return thread.getRemindersSnoozedUntil();
return thread.getRemindersSnoozedUntil().minus(configuredDuration);
}
return getUpdatedOrCrated(thread);
}