aboutsummaryrefslogtreecommitdiff
path: root/webclient
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-04-08 12:10:26 +0200
committertomsmeding <tom.smeding@gmail.com>2017-04-08 12:10:26 +0200
commitc334bea0a39a2627e63102fb95b62517dc4c0b69 (patch)
treee5d240f9bacb86129307030f7ddd922a267a1027 /webclient
parentc2e34e8976012a5f50f789fb1f78334a09ac1771 (diff)
webclient: Support _push invite/join
Diffstat (limited to 'webclient')
-rw-r--r--webclient/client.html11
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+"'"]);
}