Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chat: correctly handle player and non-player chats #427

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

windo
Copy link
Contributor

@windo windo commented Feb 3, 2025

Chat messages from players are sent immediately to the client, but non-player chats are not. And then when the game ends, all (player and non-player) chats are sent once again.

So to avoid duplicating chats from the players, keep track of the timestamp of the last chat received, to ignore the duplicates sent at the end of the game.

And to also include chats during the game from non-players, don't filter on the cutoff time for non-player chats - they will always be sent just once anyway.

Chat messages from players are sent immediately to the client, but
non-player chats are not. And then when the game ends, all (player and
non-player) chats are sent once again.

So to avoid duplicating chats from the players, keep track of the
timestamp of the last chat received, to ignore the duplicates sent at
the end of the game.

And to also include chats during the game from non-players, don't filter
on the cutoff time for non-player chats - they will always be sent just
once anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant