]> git.babelmonkeys.de Git - xmppchat.git/commitdiff
Show joins and leaves
authorFlorian Zeitz <florob@babelmonkeys.de>
Sat, 8 Aug 2009 20:17:09 +0000 (22:17 +0200)
committerFlorian Zeitz <florob@babelmonkeys.de>
Sat, 8 Aug 2009 20:17:09 +0000 (22:17 +0200)
js/main.js

index 2647add49e260805a76efdd89647eb1714a3b01b..5329f8bf20cd9937775812d38eb5884f838f3357 100644 (file)
@@ -112,8 +112,10 @@ function handlePresence(presence) {
        if (type == 'unavailable') {
                element = document.getElementById(nick);
                roster_list.removeChild(element);
+               $('#chat').append('<div class="msg"><span class="server">' + nick + ' left the groupchat</span></div>');
        } else {
                roster_list.innerHTML += '<li id="' + nick + '" onclick="addBubble(' + "'" + nick + "')" + '" >' + nick + '</li>';
+               $('#chat').append('<div class="msg"><span class="server">' + nick + ' joined the groupchat</span></div>');
        }
 
        return true;