-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mapping user email to nickname in MessageResponseDto #80
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
немає додавання поля нікнейму в LastMessageResponseDto що повинно бути по завданню.
messageResponseDto.setSentFrom(contactService.findByEmail(email).getNickname()); | ||
messageResponseDto.setSendTo( | ||
contactService.findByEmail(messageResponseDto.getSendTo()).getNickname()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
немає перевірки на exception. setSendTo в більшості випадків буде викликати ContactNotFoundException бо такого контакта як, наприклад, Topic id=4 немає.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
так. не побачив що це приватний у тебе топік.
messageResponseDto.setSentFrom(contactService.findByEmail(email).getNickname()); | ||
messageResponseDto.setSendTo( | ||
contactService.findByEmail(messageResponseDto.getSendTo()).getNickname()); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
так. не побачив що це приватний у тебе топік.
List<MessageResponseDto> messages = messageService.findAllByTopicId(topicId, pageRequestDto) | ||
.stream() | ||
.peek(m -> m.setSentFrom(contactService.findByEmail(m.getSentFrom()).getNickname())) | ||
.toList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
цей використовується тільки для публічних топіків?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Це для отримання історії переписки як публічних так і приватних топіків.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
якщо і для приватних то не бачу setSentTo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Дякую я це не помітив)
No description provided.