Skip to content

Commit

Permalink
only include sent usernames when comparing crowd messages
Browse files Browse the repository at this point in the history
the full list of username is only there to check against potential
streamers
  • Loading branch information
ornicar committed Sep 22, 2024
1 parent 418a208 commit 023819a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/scala/ipc/CrowdJson.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ final class CrowdJson(inquirers: Inquirers, mongo: Mongo, lightUserApi: LightUse
keepOnlyStudyMembers(crowd).map: users =>
crowd.copy(users = users, anons = 0)
else Future.successful(crowd)
}.flatMap(spectatorsOf(_, crowd.users)).map(ClientIn.Crowd.make(_, crowd.members, crowd.users))
}.flatMap: withFewUsers =>
spectatorsOf(withFewUsers, crowd.users).map: json =>
ClientIn.Crowd.make(json, withFewUsers.members, withFewUsers.users)

def round(crowd: RoundCrowd.Output): Future[ClientIn.Crowd] =
spectatorsOf(
Expand Down

0 comments on commit 023819a

Please sign in to comment.