diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 4bde23bc7..1b6e5b0e1 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -13,7 +13,10 @@ "Bash(mvn test:*)", "Bash(mvn help:describe:*)", "mcp__github__get_commit", - "Bash(findstr:*)" + "Bash(findstr:*)", + "Bash(dir \"c:\\\\temp\\\\hydrastats\")", + "Bash(gh issue view:*)", + "Bash(gh api:*)" ], "deny": [], "ask": [] diff --git a/core/src/main/java/org/nzbhydra/notifications/NotificationHandler.java b/core/src/main/java/org/nzbhydra/notifications/NotificationHandler.java index e5500dea5..2ef39bd74 100644 --- a/core/src/main/java/org/nzbhydra/notifications/NotificationHandler.java +++ b/core/src/main/java/org/nzbhydra/notifications/NotificationHandler.java @@ -97,7 +97,8 @@ public class NotificationHandler { throw new RuntimeException("Unable to generate notification body", e); } - notificationRepository.save(new NotificationEntity(event.getEventType(), NotificationMessageType.valueOf(configEntry.getMessageType().name()), notificationTitle, notificationBody, configEntry.getAppriseUrls(), Instant.now())); + final String truncatedBody = notificationBody.length() > 255 ? notificationBody.substring(0, 255) : notificationBody; + notificationRepository.save(new NotificationEntity(event.getEventType(), NotificationMessageType.valueOf(configEntry.getMessageType().name()), notificationTitle, truncatedBody, configEntry.getAppriseUrls(), Instant.now())); if (notificationConfig.getAppriseType() == NotificationConfig.AppriseType.NONE) { logger.debug(LoggingMarkers.NOTIFICATIONS, "Apprise type set to None"); diff --git a/core/src/main/resources/changelog.yaml b/core/src/main/resources/changelog.yaml index 0757549e3..2aae16f87 100644 --- a/core/src/main/resources/changelog.yaml +++ b/core/src/main/resources/changelog.yaml @@ -1,4 +1,9 @@ #@formatter:off +- version: "v8.3.1" + date: "2026-01-30" + changes: + - type: "fix" + text: "Truncate notification body to 255 characters before saving to database to prevent DataIntegrityViolationException causing massive log files. See #1040" - version: "v8.3.0" date: "2026-01-16" changes: