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)
|
.organisationId(c.getOrganisation() != null ? c.getOrganisation().getId() : null)
|
||||||
.lastMessage(lastMsg != null ? convertMessageToResponse(lastMsg) : null)
|
.lastMessage(lastMsg != null ? convertMessageToResponse(lastMsg) : null)
|
||||||
.unreadCount((int) unreadCount)
|
.unreadCount((int) unreadCount)
|
||||||
.isMuted(c.getIsMuted())
|
.muted(Boolean.TRUE.equals(c.getIsMuted()))
|
||||||
.isPinned(c.getIsPinned())
|
.pinned(Boolean.TRUE.equals(c.getIsPinned()))
|
||||||
.isArchived(c.getIsArchived())
|
.archived(Boolean.TRUE.equals(c.getIsArchived()))
|
||||||
.createdAt(c.getDateCreation())
|
.createdAt(c.getDateCreation())
|
||||||
.updatedAt(c.getUpdatedAt())
|
.updatedAt(c.getUpdatedAt())
|
||||||
.avatarUrl(c.getAvatarUrl())
|
.avatarUrl(c.getAvatarUrl())
|
||||||
@@ -201,8 +201,8 @@ public class ConversationService {
|
|||||||
.status(m.getStatus())
|
.status(m.getStatus())
|
||||||
.priority(m.getPriority())
|
.priority(m.getPriority())
|
||||||
.createdAt(m.getDateCreation())
|
.createdAt(m.getDateCreation())
|
||||||
.isEdited(m.getIsEdited())
|
.edited(Boolean.TRUE.equals(m.getIsEdited()))
|
||||||
.isDeleted(m.getIsDeleted())
|
.deleted(Boolean.TRUE.equals(m.getIsDeleted()))
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -195,9 +195,9 @@ public class MessageService {
|
|||||||
.createdAt(m.getDateCreation())
|
.createdAt(m.getDateCreation())
|
||||||
.readAt(m.getReadAt())
|
.readAt(m.getReadAt())
|
||||||
.attachments(attachments)
|
.attachments(attachments)
|
||||||
.isEdited(m.getIsEdited())
|
.edited(Boolean.TRUE.equals(m.getIsEdited()))
|
||||||
.editedAt(m.getEditedAt())
|
.editedAt(m.getEditedAt())
|
||||||
.isDeleted(m.getIsDeleted())
|
.deleted(Boolean.TRUE.equals(m.getIsDeleted()))
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user