diff --git a/src/messenger/js/chat.js b/src/messenger/js/chat.js
index ee8882b7..6735784a 100644
--- a/src/messenger/js/chat.js
+++ b/src/messenger/js/chat.js
@@ -85,7 +85,7 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, {
},
updateOptions: function(act) {
- this._options.parameters = 'act='+act+'&thread=' + (this._options.threadid || -1) +
+ this._options.parameters = 'act='+act+'&thread=' + (this._options.threadid || 0) +
'&token=' + (this._options.token || 0)+
'&lastid=' + (this._options.lastid || 0);
if( this._options.user )
@@ -151,7 +151,7 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, {
changeName: function(newname) {
this.skipNextsound = true;
- new Ajax.Request(this._options.servl, {parameters:'act=rename&thread=' + (this._options.threadid || -1) +
+ new Ajax.Request(this._options.servl, {parameters:'act=rename&thread=' + (this._options.threadid || 0) +
'&token=' + (this._options.token || 0) + '&name=' + encodeURIComponent(newname)});
},
@@ -165,7 +165,7 @@ Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, {
},
closeThread: function() {
- var _params = 'act=close&thread=' + (this._options.threadid || -1) + '&token=' + (this._options.token || 0);
+ var _params = 'act=close&thread=' + (this._options.threadid || 0) + '&token=' + (this._options.token || 0);
if( this._options.user )
_params += "&user=true";
new Ajax.Request(this._options.servl, {parameters:_params, onComplete: this.onThreadClosed.bind(this)});
diff --git a/src/messenger/webim/js/chat.js b/src/messenger/webim/js/chat.js
index 4e6388eb..3466182f 100644
--- a/src/messenger/webim/js/chat.js
+++ b/src/messenger/webim/js/chat.js
@@ -1 +1 @@
-var $s={_s:function(mt){if(mt.contentDocument){return mt.contentDocument;} else if(mt.contentWindow){return mt.contentWindow.document;} else if(mt.document){return mt.document;} else{return null;} } ,nt:function(mt){var qt=this._s(mt);qt.open();qt.write("<\150\164m\154><\150e\u0061\u0064\076");qt.write("");qt.write("<\057\150\145a\144>\u003c\u0062o\144y\040b\147c\u006fl\u006f\162='#\106F\u0046\106\106F'\040\u0074\145xt='\043\u0030\u0030\0600\060\u0030'\u0020l\u0069\156\u006b='\043\u0043\062\u0038\u0034\0600'\u0020v\154\151\u006e\u006b='#\u0043\u0032\u00384\u00300'\040\141l\151nk='#C28\06400'\040\155a\162gin\u0077\u0069dt\u0068\u003d'0'\u0020ma\162gi\156\150e\151\147\150t\u003d'0' \154ef\164m\141\162g\151n\075'\u0030' ri\u0067\u0068t\u006dargi\156='\u0030'\040t\u006f\160m\u0061rg\151\u006e='0'\u0020bo\164\164\157mmarg\u0069\156='\u0030'>");qt.write("\074ta\u0062\154e \u0077\151\144\u0074\u0068\075'1\u0030\u0030\u0025'\040\u0063\145\u006clspa\143\151ng\u003d'0'\040cel\u006cp\141dd\u0069ng\u003d'\u0030'\u0020\142\157r\u0064er='0'\076\074\164\u0072>\074td \166\u0061li\147n\075't\157p'\u0020\u0063l\141ss='\155\u0065s\u0073\141\u0067\u0065'\040\151d\075'cont\145nt'\076<\057\164\144\076<\u002ft\u0072\076\164able\u003e<\u0061\040\u0069d\075'bo\164\164\u006fm'\u002f\076");qt.write("\074\u002fb\157\u0064y\076<\u002fhtm\u006c\076");qt.close();mt.onload=function(){if(mt.tt){$s._s(mt).getElementById('c\u006f\u006e\164\u0065\u006et').innerHTML+=mt.tt;$s.ut(mt);} } ;} ,ht:function(mt,it){var jt=this._s(mt).getElementById('\u0063\u006fnten\164');if(jt==null){if(!mt.tt)mt.tt="";mt.tt+=it;} else{jt.innerHTML+=it;} } ,ut:function(mt){var kt=this._s(mt).getElementById('bott\157m');if(myAgent=='\157pe\u0072\141'){mt.contentWindow.scrollTo(0,this._s(mt).getElementById('\143\u006fn\164e\u006e\u0074').clientHeight);} else if(kt)kt.scrollIntoView(false);} } ;sq.lt=mn.nn();mn.sn(sq.lt,sq.lq,{qn:function(pq){this.oq(pq);this.pq.onComplete=this.ot.on(this);this.pq.jr=this.pt.on(this);this.pq.hr=this._q.on(this);this.pq.timeout=0x1388;this.dt={} ;this.frequency=(this.pq.frequency||2);this.et=0;this.ft=true;this.gt=true;this.at=true;this.bt=this.pq.ct!=null;$s.nt(this.pq.vt);if(this.pq.ct){this.pq.ct.onkeydown=this.wt.on(this);this.pq.ct.onfocus=(function(){this.at=true;} ).on(this);this.pq.ct.onblur=(function(){this.at=false;} ).on(this)} this.xt();} ,pt:function(yt,zt){this.$t("o\146f\u006c\u0069\u006ee\054\040r\145\143\u006fnn\u0065\143\u0074\151n\u0067");this._t();this.mu=setTimeout(this.xt.on(this),0x3e8);} ,_q:function(yt){this.$t("\u0074\u0069m\145out\u002c\040r\u0065\u0063\157\u006en\u0065c\u0074\u0069\156\u0067");this._t();this.mu=setTimeout(this.xt.on(this),(936+64));} ,nu:function(qu){this.pq.fq='a\143\164='+qu+'&\u0074h\u0072\u0065ad='+(this.pq.threadid||-1)+'\046to\153en='+(this.pq.token||0)+'\u0026l\u0061\u0073\u0074\u0069\u0064='+(this.pq.ru||0);if(this.pq.user)this.pq.fq+="&u\163\145\162=t\162u\145";if(qu=='\162ef\162es\u0068'&&this.pq.ct&&this.pq.ct.value!='')this.pq.fq+="\u0026t\u0079pe\144\u003d\061";} ,su:function(tu){if(this.pq.ct)this.pq.ct.disabled=!tu;} ,_t:function(){this.su(true);if(this.dt.pq)this.dt.pq.onComplete=undefined;clearTimeout(this.mu);} ,xt:function(){this.nu("\u0072efr\u0065\u0073h");this.dt=new sq.vq(this.pq.servl,this.pq);} ,ot:function(hq){try{this.su(true);this.ft=true;var uu=sq.uq(hq);if(uu&&uu.tagName=='\u0074\150\162\145\141\u0064'){this.hu(uu);} else{this.iu(hq,uu,'\u0072\145\u0066re\u0073h\u0020\u006des\163a\147\u0065\163\u0020f\u0061\151led');} } catch(e){} this.gt=false;this.mu=setTimeout(this.xt.on(this),this.frequency*(729+271));} ,ju:function(ku){if(ku==""||!this.ft){return;} this.ft=false;this._t();this.gt=true;this.nu("pos\164");var lu={} .un(this.pq);lu.fq+="\u0026\u006d\u0065\u0073\163\u0061\u0067\145\u003d"+encodeURIComponent(ku);lu.onComplete=(function(ou){this.ot(ou);if(this.pq.ct){this.pq.ct.value='';this.pq.ct.focus();} } ).on(this);if(myRealAgent!='\157\160era')this.su(false);this.dt=new sq.vq(this.pq.servl,lu);} ,pu:function(du){this.gt=true;new sq.vq(this.pq.servl,{fq:'\141\143\164\075re\156\u0061\155e\046t\150\162\u0065ad='+(this.pq.threadid||-1)+'\046t\157\153\145\156='+(this.pq.token||0)+'\046nam\u0065='+encodeURIComponent(du)} );} ,eu:function(hq){var uu=sq.uq(hq);if(uu&&uu.tagName=='\u0063lo\163ed'){setTimeout('\u0077i\u006e\144\u006f\u0077.cl\157\163\u0065\050)',0x7d0);} else{this.iu(hq,uu,'\143\141\156no\164\040cl\157\163\145');} } ,fu:function(){var gu='act\075\143\u006c\u006fs\145\046t\u0068\162\u0065\141\144='+(this.pq.threadid||-1)+'\u0026to\u006b\145\156='+(this.pq.token||0);if(this.pq.user)gu+="&\165s\u0065r\075t\u0072u\u0065";new sq.vq(this.pq.servl,{fq:gu,onComplete:this.eu.on(this)} );} ,au:function(bu,ct){var cu=qs.us(ct);$s.ht(bu,cu);} ,vu:function(wu){if($("t\171\u0070\u0069\156\u0067div")){$("\164\171\160\u0069ngd\151\166").style.display=wu?'i\156l\151n\145':'\156o\156e';} } ,xu:function(yu){var zu=qs.us(yu);if(this.pq.yu&&this.pq.user){this.pq.yu.innerHTML=zu!=""?"<\u0069\155g\040sr\u0063\u003d\""+rt.st+"\u002f\u0069\155\u0061g\u0065s/\u0066\u0072ee.g\u0069\146\"\040\167i\144th\u003d\"7\"\040h\u0065\151g\u0068t\u003d\"\061\" \u0062\157r\144e\162\075\"\u0030\"\u0020a\u006c\164\075\"\"\u0020/\u003e\u003cimg \u0073\162\u0063=\""+zu+"\"\040\u0062o\162\u0064e\u0072\u003d\"0\"\040\141\u006ct=\"\"\u002f\076":"";} } ,hu:function(uu){var $u=false;var _u=this.pq.vt;var mh=qs.ks(uu,"\154a\163\u0074id");if(mh){this.pq.ru=mh;} var nh=qs.ks(uu,"t\171\160in\147");if(nh){this.vu(nh=='1');} var qh=qs.ks(uu,"\143\u0061np\157st");if(qh){if(qh=='\061'&&!this.bt||this.bt&&qh!='1'){window.location.href=window.location.href;} } for(var i=0;i=0){var tu="\165\u0070da\u0074ed";if(this.et>0){var sh=((new Date()).getTime()-this.et)/01750;tu=tu+",\u0020"+sh+"\u0020\u0073\145\u0063s";if(sh>012){alert(tu);} } this.et=(new Date()).getTime();this.$t(tu);} else{this.th();} if($u){$s.ut(this.pq.vt);if(!this.gt){xs(rt.st+'\057s\157un\u0064\163\057\u006ee\167_m\145\u0073s\u0061g\u0065.wa\u0076');} if(!this.at){window.focus();} } } ,wt:function(k){if(k){uh=k.ctrlKey;k=k.which;} else{k=event.keyCode;uh=event.ctrlKey;} if(this.pq.ct&&((k==(10+3)&&(uh||myRealAgent=='o\160er\141'))||(k==(6+4)))){var hh=this.pq.ct.value;if(myRealAgent=='op\145\162\u0061'){hh=hh.replace(/[\r\n]+$/,'');} this.ju(hh);return false;} return true;} ,iu:function(hq,uu,ih){if(uu&&uu.tagName=='e\162\u0072\u006fr'){this.$t(qs.rs(uu,"\u0064e\u0073\143r"));} else{this.$t("\162\145\143o\u006en\145c\u0074in\147");} } ,jh:function(k){if($("e\156gin\u0065\151\u006efo")){$("\u0065ng\u0069ne\u0069n\u0066\u006f").style.display='inl\u0069n\145';$("\u0065\u006e\u0067\151ne\u0069n\146\157").innerHTML=k;} } ,$t:function(k){if(this.kh)clearTimeout(this.kh);this.jh(k);this.kh=setTimeout(this.th.on(this),07640);} ,th:function(){$("\145\u006eg\151\u006e\u0065\u0069nfo").style.display='no\156\u0065';} } );lh=mn.nn();lh.prototype={qn:function(pq){this.pq=pq;this.oh=0;if(this.pq.ph&&this.pq.dh&&this.pq.eh){this.pq.eh.onmousedown=this.fh.on(this);this.pq.eh.onmouseup=this.gh.on(this);this.pq.eh.onmousemove=this.ah.on(this);} } ,fh:function(e){var or=e||event;if(this.pq.eh.setCapture)this.pq.eh.setCapture();this.bh=this.pq.ph.style.pixelHeight||this.pq.ph.clientHeight;this.ch=or.screenY;this.pq.vh=this.pq.ph.style.pixelHeight+this.pq.dh.clientHeight-this.pq.wh;this.oh=1;} ,gh:function(){if(this.oh){if(this.pq.eh.releaseCapture)this.pq.eh.releaseCapture();this.oh=0;} } ,ah:function(e){var or=e||event;if(this.oh){var xh=this.bh-(or.screenY-this.ch);if(xh>this.pq.vh)xh=this.pq.vh;else if(xh<\150e\u0061\u0064\076");qt.write("");qt.write("<\057\150\145a\144>\u003c\u0062o\144y\040b\147c\u006fl\u006f\162='#\106F\u0046\106\106F'\040\u0074\145xt='\043\u0030\u0030\0600\060\u0030'\u0020l\u0069\156\u006b='\043\u0043\062\u0038\u0034\0600'\u0020v\154\151\u006e\u006b='#\u0043\u0032\u00384\u00300'\040\141l\151nk='#C28\06400'\040\155a\162gin\u0077\u0069dt\u0068\u003d'0'\u0020ma\162gi\156\150e\151\147\150t\u003d'0' \154ef\164m\141\162g\151n\075'\u0030' ri\u0067\u0068t\u006dargi\156='\u0030'\040t\u006f\160m\u0061rg\151\u006e='0'\u0020bo\164\164\157mmarg\u0069\156='\u0030'>");qt.write("\074ta\u0062\154e \u0077\151\144\u0074\u0068\075'1\u0030\u0030\u0025'\040\u0063\145\u006clspa\143\151ng\u003d'0'\040cel\u006cp\141dd\u0069ng\u003d'\u0030'\u0020\142\157r\u0064er='0'\076\074\164\u0072>\074td \166\u0061li\147n\075't\157p'\u0020\u0063l\141ss='\155\u0065s\u0073\141\u0067\u0065'\040\151d\075'cont\145nt'\076<\057\164\144\076<\u002ft\u0072\076\164able\u003e<\u0061\040\u0069d\075'bo\164\164\u006fm'\u002f\076");qt.write("\074\u002fb\157\u0064y\076<\u002fhtm\u006c\076");qt.close();mt.onload=function(){if(mt.tt){$s._s(mt).getElementById('c\u006f\u006e\164\u0065\u006et').innerHTML+=mt.tt;$s.ut(mt);} } ;} ,ht:function(mt,it){var jt=this._s(mt).getElementById('\u0063\u006fnten\164');if(jt==null){if(!mt.tt)mt.tt="";mt.tt+=it;} else{jt.innerHTML+=it;} } ,ut:function(mt){var kt=this._s(mt).getElementById('bott\157m');if(myAgent=='\157pe\u0072\141'){mt.contentWindow.scrollTo(0,this._s(mt).getElementById('\143\u006fn\164e\u006e\u0074').clientHeight);} else if(kt)kt.scrollIntoView(false);} } ;sq.lt=mn.nn();mn.sn(sq.lt,sq.lq,{qn:function(pq){this.oq(pq);this.pq.onComplete=this.ot.on(this);this.pq.jr=this.pt.on(this);this.pq.hr=this._q.on(this);this.pq.timeout=0x1388;this.dt={} ;this.frequency=(this.pq.frequency||2);this.et=0;this.ft=true;this.gt=true;this.at=true;this.bt=this.pq.ct!=null;$s.nt(this.pq.vt);if(this.pq.ct){this.pq.ct.onkeydown=this.wt.on(this);this.pq.ct.onfocus=(function(){this.at=true;} ).on(this);this.pq.ct.onblur=(function(){this.at=false;} ).on(this)} this.xt();} ,pt:function(yt,zt){this.$t("o\146f\u006c\u0069\u006ee\054\040r\145\143\u006fnn\u0065\143\u0074\151n\u0067");this._t();this.mu=setTimeout(this.xt.on(this),0x3e8);} ,_q:function(yt){this.$t("\u0074\u0069m\145out\u002c\040r\u0065\u0063\157\u006en\u0065c\u0074\u0069\156\u0067");this._t();this.mu=setTimeout(this.xt.on(this),(936+64));} ,nu:function(qu){this.pq.fq='a\143\164='+qu+'&\u0074h\u0072\u0065ad='+(this.pq.threadid||0)+'\046to\153en='+(this.pq.token||0)+'\u0026l\u0061\u0073\u0074\u0069\u0064='+(this.pq.ru||0);if(this.pq.user)this.pq.fq+="&u\163\145\162=t\162u\145";if(qu=='\162ef\162es\u0068'&&this.pq.ct&&this.pq.ct.value!='')this.pq.fq+="\u0026t\u0079pe\144\u003d\061";} ,su:function(tu){if(this.pq.ct)this.pq.ct.disabled=!tu;} ,_t:function(){this.su(true);if(this.dt.pq)this.dt.pq.onComplete=undefined;clearTimeout(this.mu);} ,xt:function(){this.nu("\u0072efr\u0065\u0073h");this.dt=new sq.vq(this.pq.servl,this.pq);} ,ot:function(hq){try{this.su(true);this.ft=true;var uu=sq.uq(hq);if(uu&&uu.tagName=='\u0074\150\162\145\141\u0064'){this.hu(uu);} else{this.iu(hq,uu,'\u0072\145\u0066re\u0073h\u0020\u006des\163a\147\u0065\163\u0020f\u0061\151led');} } catch(e){} this.gt=false;this.mu=setTimeout(this.xt.on(this),this.frequency*(729+271));} ,ju:function(ku){if(ku==""||!this.ft){return;} this.ft=false;this._t();this.gt=true;this.nu("pos\164");var lu={} .un(this.pq);lu.fq+="\u0026\u006d\u0065\u0073\163\u0061\u0067\145\u003d"+encodeURIComponent(ku);lu.onComplete=(function(ou){this.ot(ou);if(this.pq.ct){this.pq.ct.value='';this.pq.ct.focus();} } ).on(this);if(myRealAgent!='\157\160era')this.su(false);this.dt=new sq.vq(this.pq.servl,lu);} ,pu:function(du){this.gt=true;new sq.vq(this.pq.servl,{fq:'\141\143\164\075re\156\u0061\155e\046t\150\162\u0065ad='+(this.pq.threadid||0)+'\046t\157\153\145\156='+(this.pq.token||0)+'\046nam\u0065='+encodeURIComponent(du)} );} ,eu:function(hq){var uu=sq.uq(hq);if(uu&&uu.tagName=='\u0063lo\163ed'){setTimeout('\u0077i\u006e\144\u006f\u0077.cl\157\163\u0065\050)',0x7d0);} else{this.iu(hq,uu,'\143\141\156no\164\040cl\157\163\145');} } ,fu:function(){var gu='act\075\143\u006c\u006fs\145\046t\u0068\162\u0065\141\144='+(this.pq.threadid||0)+'\u0026to\u006b\145\156='+(this.pq.token||0);if(this.pq.user)gu+="&\165s\u0065r\075t\u0072u\u0065";new sq.vq(this.pq.servl,{fq:gu,onComplete:this.eu.on(this)} );} ,au:function(bu,ct){var cu=qs.us(ct);$s.ht(bu,cu);} ,vu:function(wu){if($("t\171\u0070\u0069\156\u0067div")){$("\164\171\160\u0069ngd\151\166").style.display=wu?'i\156l\151n\145':'\156o\156e';} } ,xu:function(yu){var zu=qs.us(yu);if(this.pq.yu&&this.pq.user){this.pq.yu.innerHTML=zu!=""?"<\u0069\155g\040sr\u0063\u003d\""+rt.st+"\u002f\u0069\155\u0061g\u0065s/\u0066\u0072ee.g\u0069\146\"\040\167i\144th\u003d\"7\"\040h\u0065\151g\u0068t\u003d\"\061\" \u0062\157r\144e\162\075\"\u0030\"\u0020a\u006c\164\075\"\"\u0020/\u003e\u003cimg \u0073\162\u0063=\""+zu+"\"\040\u0062o\162\u0064e\u0072\u003d\"0\"\040\141\u006ct=\"\"\u002f\076":"";} } ,hu:function(uu){var $u=false;var _u=this.pq.vt;var mh=qs.ks(uu,"\154a\163\u0074id");if(mh){this.pq.ru=mh;} var nh=qs.ks(uu,"t\171\160in\147");if(nh){this.vu(nh=='1');} var qh=qs.ks(uu,"\143\u0061np\157st");if(qh){if(qh=='\061'&&!this.bt||this.bt&&qh!='1'){window.location.href=window.location.href;} } for(var i=0;i=0){var tu="\165\u0070da\u0074ed";if(this.et>0){var sh=((new Date()).getTime()-this.et)/01750;tu=tu+",\u0020"+sh+"\u0020\u0073\145\u0063s";if(sh>012){alert(tu);} } this.et=(new Date()).getTime();this.$t(tu);} else{this.th();} if($u){$s.ut(this.pq.vt);if(!this.gt){xs(rt.st+'\057s\157un\u0064\163\057\u006ee\167_m\145\u0073s\u0061g\u0065.wa\u0076');} if(!this.at){window.focus();} } } ,wt:function(k){if(k){uh=k.ctrlKey;k=k.which;} else{k=event.keyCode;uh=event.ctrlKey;} if(this.pq.ct&&((k==(10+3)&&(uh||myRealAgent=='o\160er\141'))||(k==(6+4)))){var hh=this.pq.ct.value;if(myRealAgent=='op\145\162\u0061'){hh=hh.replace(/[\r\n]+$/,'');} this.ju(hh);return false;} return true;} ,iu:function(hq,uu,ih){if(uu&&uu.tagName=='e\162\u0072\u006fr'){this.$t(qs.rs(uu,"\u0064e\u0073\143r"));} else{this.$t("\162\145\143o\u006en\145c\u0074in\147");} } ,jh:function(k){if($("e\156gin\u0065\151\u006efo")){$("\u0065ng\u0069ne\u0069n\u0066\u006f").style.display='inl\u0069n\145';$("\u0065\u006e\u0067\151ne\u0069n\146\157").innerHTML=k;} } ,$t:function(k){if(this.kh)clearTimeout(this.kh);this.jh(k);this.kh=setTimeout(this.th.on(this),07640);} ,th:function(){$("\145\u006eg\151\u006e\u0065\u0069nfo").style.display='no\156\u0065';} } );lh=mn.nn();lh.prototype={qn:function(pq){this.pq=pq;this.oh=0;if(this.pq.ph&&this.pq.dh&&this.pq.eh){this.pq.eh.onmousedown=this.fh.on(this);this.pq.eh.onmouseup=this.gh.on(this);this.pq.eh.onmousemove=this.ah.on(this);} } ,fh:function(e){var or=e||event;if(this.pq.eh.setCapture)this.pq.eh.setCapture();this.bh=this.pq.ph.style.pixelHeight||this.pq.ph.clientHeight;this.ch=or.screenY;this.pq.vh=this.pq.ph.style.pixelHeight+this.pq.dh.clientHeight-this.pq.wh;this.oh=1;} ,gh:function(){if(this.oh){if(this.pq.eh.releaseCapture)this.pq.eh.releaseCapture();this.oh=0;} } ,ah:function(e){var or=e||event;if(this.oh){var xh=this.bh-(or.screenY-this.ch);if(xh>this.pq.vh)xh=this.pq.vh;else if(xh