1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-05-31 02:29:18 +02:00

Fix panic in manager when attachment-cache-dir is not set, fixes

This commit is contained in:
binwiederhier 2023-02-17 15:56:48 -05:00
parent 7fb6f794e5
commit 38e7801b41
5 changed files with 68 additions and 30 deletions

View file

@ -536,7 +536,7 @@ func (c *messageCache) ExpireMessages(topics ...string) error {
}
defer tx.Rollback()
for _, t := range topics {
if _, err := tx.Exec(updateMessagesForTopicExpiryQuery, time.Now().Unix(), t); err != nil {
if _, err := tx.Exec(updateMessagesForTopicExpiryQuery, time.Now().Unix()-1, t); err != nil {
return err
}
}