mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-30 16:09:01 +00:00
[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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user