feat: harden attachment storage for level 4
This commit is contained in:
@@ -23,7 +23,7 @@ public record CreateMessageRequest(
|
||||
}
|
||||
|
||||
@AssertTrue(message = "attachment_ids must be unique and non-null")
|
||||
public boolean areAttachmentIdsValid() {
|
||||
public boolean isAttachmentIdsValid() {
|
||||
return attachment_ids != null
|
||||
&& attachment_ids.stream().noneMatch(java.util.Objects::isNull)
|
||||
&& new HashSet<>(attachment_ids).size() == attachment_ids.size();
|
||||
|
||||
Reference in New Issue
Block a user