-
Notifications
You must be signed in to change notification settings - Fork 459
Labels
Feature - FrontendAn entirely new feature, or changes to existing feature. User facing.An entirely new feature, or changes to existing feature. User facing.good first issueGood for new contributors.Good for new contributors.
Description
Currently the kickClient
method only sends a generic "Kicked from game (you may have been playing on another tab)" message for all kick scenarios. We need to differentiate between different kick reasons:
- Kicked by admin - needs specific error message
- Kicked by private lobby creator - introduced in Private Lobbies: Add kick player functionality #1436, needs specific message
- Kicked due to multi-tabbing - current default message
- Default fallback - possibly same message as multi-tabbing message
Current implementation
The method currently sends the same error message regardless of kick reason:
client.ws.send(
JSON.stringify({
type: "error",
error: "Kicked from game (you may have been playing on another tab)",
} satisfies ServerErrorMessage),
);
Proposed changes
- Add optional
reason
parameter tokickClient()
method - Send appropriate error message based on kick reason
- Update all call sites to specify kick reason
Question: Should these new error messages be added to the translation system?
FloPinguin
Metadata
Metadata
Assignees
Labels
Feature - FrontendAn entirely new feature, or changes to existing feature. User facing.An entirely new feature, or changes to existing feature. User facing.good first issueGood for new contributors.Good for new contributors.
Type
Projects
Status
Triage