Skip to content

Commit

Permalink
also route chat messages through the study batcher
Browse files Browse the repository at this point in the history
since chat messages are versioned,
having them bypass the batcher results
in broken ordering, if other versioned
messages are being batched while the chat message goes through
  • Loading branch information
ornicar committed Dec 30, 2024
1 parent 61380ef commit 1289f86
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/scala/LilaHandler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ final class LilaHandler(

_ match
case t: TellRoomVersion => batcher.add(t.roomId, ClientIn.Versioned(t.json, t.version, t.troll))
case TellRoomChat(roomId, version, troll, payload) =>
batcher.add(roomId, ClientIn.Versioned(payload, version, troll))
case LilaOut.RoomIsPresent(reqId, roomId, userId) =>
lila.emit.study(LilaIn.ReqResponse(reqId, roomCrowd.isPresent(roomId, userId).toString))
case LilaBoot => roomBoot(_.idFilter.study, lila.emit.study)
Expand Down

0 comments on commit 1289f86

Please sign in to comment.