Skip to content

Commit

Permalink
compat for lichess mobile: don't send study messages in batches
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Dec 28, 2024
1 parent 5e1fbde commit 061a49e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/main/scala/actor/RoomActor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,15 @@ object RoomActor:
None -> None

case ClientIn.VersionedBatch(msgs) =>
deps.clientIn:
ClientIn.PayloadBatch:
msgs.toList.reverse.map: msg =>
versionFor(state.isTroll, msg).json
if deps.req.isLichessMobile // BC, remove this in a month
then
msgs.toList.reverse.foreach: msg =>
deps.clientIn(versionFor(state.isTroll, msg))
else
deps.clientIn:
ClientIn.PayloadBatch:
msgs.toList.reverse.map: msg =>
versionFor(state.isTroll, msg).json
None -> None

case ClientIn.OnlyFor(endpoint, payload) =>
Expand Down

0 comments on commit 061a49e

Please sign in to comment.