Display incoming messages in the UI

Thu, 18 Mar 2010 18:35:50 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 18 Mar 2010 18:35:50 +0000
changeset 28
85fb6653b6e0
parent 27
8ca116c827cf
child 29
f8c700c601f9

Display incoming messages in the UI

js/supportchat.js file | annotate | diff | comparison | revisions
--- a/js/supportchat.js	Thu Mar 18 18:35:35 2010 +0000
+++ b/js/supportchat.js	Thu Mar 18 18:35:50 2010 +0000
@@ -72,6 +72,12 @@
 			{
 				set_ui_state("converse");
 			}
+		},
+		
+		message: function (stanza, muc, nick, message)
+		{
+			var html = "<span class='muc-message'><span class='muc-nick'>" + htmlescape(nick) + "</span>" + ": " + htmlescape(message) + "</span><br/>\n";
+			$("#support-log").append(html).scrollTop($("#support-log")[0].scrollHeight);
 		}
 	});
 

mercurial