Skip to content

Commit

Permalink
updated: ContactOnlineService.getOnlineUsersByTopicId
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladik-gif committed Oct 3, 2024
1 parent 28b4ee6 commit c6559f7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public void setUserOffline(String contactEmail) {
public List<ContactResponseDto> getOnlineUsersByTopicId(UUID topicId) {
//TODO додати перевірку на приватний топік. якщо це id чужого прив.топіку, то ексепшен
List<Contact> result = new ArrayList<>();
List<ContactOnline> contactOnlines = contactOnlineRedisRepository.findAllByTopicId(topicId);
for (ContactOnline contactOnline : contactOnlines) {
List<ContactOnline> allByTopicId = contactOnlineRedisRepository.findAllByTopicId(topicId);
for (ContactOnline contactOnline : allByTopicId) {
result.add(contactService.findByEmail(contactOnline.getId()));
}
return contactMapper.toListResponseDto(result);
Expand Down

0 comments on commit c6559f7

Please sign in to comment.