Index: remoting/webapp/crd/js/client_session.js |
diff --git a/remoting/webapp/crd/js/client_session.js b/remoting/webapp/crd/js/client_session.js |
index 43a99bede36811411463dc09bed6ddd01013e850..89e4be8efc025f2ed029fc1297b8bae4cacdcc47 100644 |
--- a/remoting/webapp/crd/js/client_session.js |
+++ b/remoting/webapp/crd/js/client_session.js |
@@ -57,7 +57,10 @@ remoting.ClientSession = function(plugin, host, signalStrategy) { |
remoting.SignalStrategy.State.CONNECTED); |
this.signalStrategy_.setIncomingStanzaCallback( |
this.onIncomingMessage_.bind(this)); |
- remoting.formatIq.setJids(this.signalStrategy_.getJid(), host.jabberId); |
+ |
+ /** @private */ |
+ this.iqFormatter_ = new remoting.FormatIq(); |
kelvinp
2015/04/16 18:13:01
instead of the global remoting.formatIq
|
+ this.iqFormatter_.setJids(this.signalStrategy_.getJid(), host.jabberId); |
Jamie
2015/04/16 20:15:29
Move these to ctor parameters now that the object
|
/** |
* Allow host-offline error reporting to be suppressed in situations where it |
@@ -366,7 +369,7 @@ remoting.ClientSession.prototype.sendIq_ = function(message) { |
} |
} |
- console.log(remoting.timestamp(), remoting.formatIq.prettifySendIq(message)); |
+ console.log(base.timestamp(), this.iqFormatter_.prettifySendIq(message)); |
if (this.signalStrategy_.getState() != |
remoting.SignalStrategy.State.CONNECTED) { |
console.log("Message above is dropped because signaling is not connected."); |
@@ -399,8 +402,7 @@ remoting.ClientSession.prototype.onIncomingMessage_ = function(message) { |
return; |
} |
var formatted = new XMLSerializer().serializeToString(message); |
- console.log(remoting.timestamp(), |
- remoting.formatIq.prettifyReceiveIq(formatted)); |
+ console.log(base.timestamp(), this.iqFormatter_.prettifyReceiveIq(formatted)); |
Jamie
2015/04/16 20:15:29
Unrelated to your change, but can this be restruct
kelvinp
2015/04/16 21:18:37
Done.
|
this.plugin_.onIncomingIq(formatted); |
}; |