dtang4/IceMelon-IM — pull request #3 by coderdecoder (2012-02-28 20:45:40+00:00)
Title: Updated client side code to store global msgID of the last successfully ...

...recieved/sent message from the database.

This fixes the multiple tabs/windows problem... when a client had two chat windows open on the same user only one window would receive a message sent to it, and both windows wouldn't record a message sent from one chat box. I've stored the last recieved/sent message id in a var on the client that I sent to server.php as part of the request.

On the Server side instead of using the lastMsgID field in the where clause to send back messages it uses the ID sent from the client, ensuring each chatbox will receive messages up to date with it, not the other windows/tabs's chatboxes.