checking for an existing chat window shouldn't be too hard I think.
But however, assume the following:
* you are chatting with some other party
* the other party disconnects, and you keep the chat window or tab open
* the other party reappears after some hours, and starts a new chat
* you would miss the chat state notification, because the chat window is still open
checking for an existing chat window shouldn't be too hard I think.
But however, assume the following:
* you are chatting with some other party
* the other party disconnects, and you keep the chat window or tab open
* the other party reappears after some hours, and starts a new chat
* you would miss the chat state notification, because the chat window is still open
so also would not be perfect.