The Javascript that plays chat sounds on new messages is really wierd

  •  10-05-2010, 8:49 AM

    The Javascript that plays chat sounds on new messages is really wierd

    For some reason, the function ChatUI_HANDLE_EVENT_MESSAGE in ChatUI.js only plays the "new message" sound, if the message is not older than 2 minutes.
     
    Unfortunately, the javascript function compares the message's server time to the client computers time. So in effect, the sound is not played, if the receiving users watch is ahead of the watch in the web-server.  
    var time=msg.ServerTime.getTime();
    if(time+120000 > new Date().getTime())
    {
    	ChatUI_PlaySound("type");

    This seems like a problem, that I intend to fix in our cutechat installation, but I suppose you'd also want to fix it in the source code?

View Complete Thread