Currently, if a client is kicked out of a chat, they'll simply see a "Server Went Away" message. In the background, the client's calls to pollMsg will continue but result in a 403. Exactly the same will happen if a room is closed.
This issue is to implement a new workflow for cases where a client was previously authorised and now isn't.
The aim is to allow a HTTP 200 to be returned - just once - in order to provide the client with some information about the failure (i.e. "You have been kicked from the room" etc).
We'll need a new table - FailureStates - and to adjust the code paths that can result in a 403.
When a de-authorised client's request comes in, we should check FailureStates to see if their username and room ID are in there. If it is, we should return a HTTP 200 with the JSON payload set to report the reason for the failure (maybe just "status":"kicked" etc).
We should then delete that row, so that on the next request (if there is one) the client receives a HTTP 403 (as now).
Upon receipt of one of these statuses, the client should clear it's screen, print an informational message and stop the background message poll. In essence, it needs to trigger all the actions it would if the user had typed /leave