Skip to content

Commit 1289f86

Browse files
committed
also route chat messages through the study batcher
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
1 parent 61380ef commit 1289f86

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/scala/LilaHandler.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ final class LilaHandler(
125125

126126
_ match
127127
case t: TellRoomVersion => batcher.add(t.roomId, ClientIn.Versioned(t.json, t.version, t.troll))
128+
case TellRoomChat(roomId, version, troll, payload) =>
129+
batcher.add(roomId, ClientIn.Versioned(payload, version, troll))
128130
case LilaOut.RoomIsPresent(reqId, roomId, userId) =>
129131
lila.emit.study(LilaIn.ReqResponse(reqId, roomCrowd.isPresent(roomId, userId).toString))
130132
case LilaBoot => roomBoot(_.idFilter.study, lila.emit.study)

0 commit comments

Comments
 (0)