fix: correct builder method names for boolean fields in response DTOs
ConversationResponse/MessageResponse fields (muted, pinned, archived, edited, deleted) are primitive booleans — Lombok @Builder generates .muted() not .isMuted(). Also use Boolean.TRUE.equals() for null-safe unboxing from entity Boolean wrapper fields.
This commit is contained in:
@@ -177,9 +177,9 @@ public class ConversationService {
|
||||
.organisationId(c.getOrganisation() != null ? c.getOrganisation().getId() : null)
|
||||
.lastMessage(lastMsg != null ? convertMessageToResponse(lastMsg) : null)
|
||||
.unreadCount((int) unreadCount)
|
||||
.isMuted(c.getIsMuted())
|
||||
.isPinned(c.getIsPinned())
|
||||
.isArchived(c.getIsArchived())
|
||||
.muted(Boolean.TRUE.equals(c.getIsMuted()))
|
||||
.pinned(Boolean.TRUE.equals(c.getIsPinned()))
|
||||
.archived(Boolean.TRUE.equals(c.getIsArchived()))
|
||||
.createdAt(c.getDateCreation())
|
||||
.updatedAt(c.getUpdatedAt())
|
||||
.avatarUrl(c.getAvatarUrl())
|
||||
@@ -201,8 +201,8 @@ public class ConversationService {
|
||||
.status(m.getStatus())
|
||||
.priority(m.getPriority())
|
||||
.createdAt(m.getDateCreation())
|
||||
.isEdited(m.getIsEdited())
|
||||
.isDeleted(m.getIsDeleted())
|
||||
.edited(Boolean.TRUE.equals(m.getIsEdited()))
|
||||
.deleted(Boolean.TRUE.equals(m.getIsDeleted()))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,9 +195,9 @@ public class MessageService {
|
||||
.createdAt(m.getDateCreation())
|
||||
.readAt(m.getReadAt())
|
||||
.attachments(attachments)
|
||||
.isEdited(m.getIsEdited())
|
||||
.edited(Boolean.TRUE.equals(m.getIsEdited()))
|
||||
.editedAt(m.getEditedAt())
|
||||
.isDeleted(m.getIsDeleted())
|
||||
.deleted(Boolean.TRUE.equals(m.getIsDeleted()))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user