[AB-xxx] filtering current section from past sections in twitch stream notifications to not duplicate the information in case of a refresh

This commit is contained in:
Sheldan
2026-05-15 00:26:52 +02:00
parent ae91c8ee4d
commit 0586ade8d8

View File

@@ -174,6 +174,7 @@ public class StreamerServiceBean implements StreamerService {
.getCurrentSession()
.getSections()
.stream()
.filter(pastSection -> !pastSection.getTitle().equals(stream.getTitle()) && !pastSection.getGameId().equals(stream.getGameId())) // filter out the current section in case it was refreshed
.sorted(Comparator.comparing(StreamSessionSection::getId).reversed())
.map(StreamSectionDisplay::fromSection)
.toList();