limit number for messages in chat (SOLVED)

How cand I limit the number of messages from a chat room.

I try to shift splce, but then it does not do the sync ok.

Hi @rscata,

As I mentioned in this other thread, the chat example is not a good example of how to implement a chat on Colyseus.

You'd be better off keeping the messages outside the room's state, and broadcasting them using this.broadcast(data) instead. This way is totally up to you how to sync the ephemeral messages.

Hope this helps!

@endel thanks