Declare question_muc/team_muc as global singletons

Fri, 16 Apr 2010 18:34:56 +0100

author
matthew@heavyhorse.vm.bytemark.co.uk
date
Fri, 16 Apr 2010 18:34:56 +0100
changeset 53
5cb47f4087a8
parent 52
221c4db8ab40
child 54
e5e70a46ace8

Declare question_muc/team_muc as global singletons

support-chat/js/supportchat.js file | annotate | diff | comparison | revisions
--- a/support-chat/js/supportchat.js	Fri Apr 16 18:32:30 2010 +0100
+++ b/support-chat/js/supportchat.js	Fri Apr 16 18:34:56 2010 +0100
@@ -21,6 +21,10 @@
 var question_name; // Name of the submitter
 var question_text; // The query itself
 
+/*** XMPP rooms */
+var team_muc; // MUC of the assistant team
+var question_muc; // Temporary room for query discussion
+
 /* Called by Strophe when status of connection changes
    (from disconnected to connected, vice-versa, etc.)
 */
@@ -73,7 +77,7 @@
 	set_ui_state("wait");
 	
 	// Create our question room
-	var question_muc = new MUC(conn, {
+	question_muc = new MUC(conn, {
 		// Handle room joins
 		joined: function (stanza, muc, occupant)
 		{
@@ -117,7 +121,7 @@
 		});
 	
 	// Create the team MUC object (it will be joined after we join the question MUC)
-	var team_muc = new MUC(conn, {
+	team_muc = new MUC(conn, {
 		// Someone joined the team MUC
 		joined: function (stanza, muc, occupant)
 		{

mercurial