diff options
Diffstat (limited to 'webclient')
| -rw-r--r-- | webclient/client.html | 11 | 
1 files changed, 10 insertions, 1 deletions
| diff --git a/webclient/client.html b/webclient/client.html index f905569..53a06bf 100644 --- a/webclient/client.html +++ b/webclient/client.html @@ -97,6 +97,15 @@ function reconnect(){  			if(type=="message"){  				var r=spl.word[2],u=spl.word[3],t=new Date(+spl.word[4]/1000);  				addRoomEntry(r,"message",[u,t,spl.rest[5]]); +			} else if(type=="invite"){ +				var r=spl.word[2]; +				roomlist.push(r); +				roomlogs.set(r,[]); +				fetchRoomHistory(r); +				updateRoomList(); +			} else if(type=="join"){ +				var r=spl.word[2],u=spl.word[3]; +				addRoomEntry(r,"notice",["User '"+u+"' joined this room"]);  			} else {  				alert("Unknown push message type '"+type+"'!");  			} @@ -339,7 +348,7 @@ function executeCommand(roomid,text){  			othername=spl.rest[1];  			net_send("invite "+currentroom+" "+othername,function(ok,err){  				if(err){ -					addRoomEntry(roomid,"error",["Unable to invite '"+othername+": "+err]); +					addRoomEntry(roomid,"error",["Unable to invite '"+othername+"': "+err]);  				} else {  					addRoomEntry(roomid,"notice",["Successfully invited '"+othername+"'"]);  				} | 
