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

Preserve table chat #1414

Closed
ctm opened this issue May 15, 2024 · 4 comments
Closed

Preserve table chat #1414

ctm opened this issue May 15, 2024 · 4 comments
Assignees
Labels
easy Trivial to do (even when tired!) and semi-worthwhile enhancement New feature or request high priority Should be done fairly soon

Comments

@ctm
Copy link
Owner

ctm commented May 15, 2024

Make it so when you join a table, you can see all the chat that has occurred.

When I implemented chat, I consciously chose to not play back chat from before a player joins a table, out of a (misplaced, in retrospect) desire for "appropriate" privacy. My thinking was that in real life, if someone says something at a table and you weren't there at the time, you didn't hear it.

However, this overlooks the fact that in real life, dealers (and other players) can be informative and choose when to repeat bits of information that newcomers to the table should know. With mb2, it's kind of the opposite in that chat is easy to overlook in general and it's also easy to overlook when a new player has come in (especially with table splitting, and re-entries).

Yesterday's evening tournament, for example, had a bug (#1412) that I noticed on the first hand of the game, so I pointed it out to everyone present, but due to late entry, one player didn't get the message. That was the straw that broke the camel's back.

In real life, if you say something at a table, someone who is not there may wind up hearing it anyway, either via a human repeating what has been said or perhaps by a recording device (e.g. phone). So, deliberately throwing away chat the way mb2 currently does doesn't even really approximate real life.

@ctm ctm added enhancement New feature or request easy Trivial to do (even when tired!) and semi-worthwhile labels May 15, 2024
@ctm ctm self-assigned this May 15, 2024
@ctm ctm added the high priority Should be done fairly soon label May 15, 2024
@ctm
Copy link
Owner Author

ctm commented May 15, 2024

This isn't that hard, but it does mean that NickMapper can no longer handle Chat messages. They have to go to the Table so they can be retained. I think that's still a trivial change, but I don't think I'll get it done in time for this evening's game.

@ctm
Copy link
Owner Author

ctm commented May 15, 2024

Deploying now. I don't think a deploy takes 13 minutes anymore…

@ctm
Copy link
Owner Author

ctm commented May 16, 2024

Turns out, there was a reason NickMapper was handling Chat messages: so logged-in, but not playing players can chat. NickMapper knows the TableId, but that info isn't passed on to RunningEvent, because all the UserRequests contain PlayerId and that's sufficient to identify the relevant Table, because UserRequests are for players who are playing.

So, the solution is to create a RoutedChat Request variant and have it include the TableId and then convert a Chat message in NickMapper to a RoutedChat to send to RunningEvent and then have RunningEvent use the TableId for routing, but send a Chat message to the relevant Tournament. It's an annoying special case, but no more annoying than having Chat processed directly by NickMapper.

@ctm ctm reopened this May 16, 2024
@ctm
Copy link
Owner Author

ctm commented May 16, 2024

Fixed. Deploying now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy Trivial to do (even when tired!) and semi-worthwhile enhancement New feature or request high priority Should be done fairly soon
Projects
None yet
Development

No branches or pull requests

1 participant