jitsi-meet/estos_log.js
Matthew Duggan 8314936a14 jshint cleanups
- equality operators
- missing/excess semicolons
- trailing whitespace
2014-03-01 16:39:39 +09:00

17 lines
571 B
JavaScript

Strophe.addConnectionPlugin('logger', {
// logs raw stanzas and makes them available for download as JSON
connection: null,
log: [],
init: function (conn) {
this.connection = conn;
this.connection.rawInput = this.log_incoming.bind(this);
this.connection.rawOutput = this.log_outgoing.bind(this);
},
log_incoming: function (stanza) {
this.log.push([new Date().getTime(), 'incoming', stanza]);
},
log_outgoing: function (stanza) {
this.log.push([new Date().getTime(), 'outgoing', stanza]);
},
});