From a0fef34a1fe82e88ceea011faa5675dfacafc518 Mon Sep 17 00:00:00 2001 From: paweldomas Date: Fri, 28 Nov 2014 16:16:04 +0100 Subject: [PATCH] Removes unused vars from moderatemuc.js. and fixes jshint warnings. --- moderatemuc.js | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/moderatemuc.js b/moderatemuc.js index a33a07431..2b481a8e2 100644 --- a/moderatemuc.js +++ b/moderatemuc.js @@ -1,27 +1,20 @@ +/* global $, $iq, config, connection, Strophe, toggleAudio */ /** * Moderate connection plugin. */ Strophe.addConnectionPlugin('moderate', { connection: null, - roomjid: null, - myroomjid: null, - members: {}, - list_members: [], // so we can elect a new focus - presMap: {}, - preziMap: {}, - joined: false, - isOwner: false, init: function (conn) { this.connection = conn; - this.connection.addHandler( this.onMute.bind(this), - 'http://jitsi.org/jitmeet/audio', - 'iq', - 'set', - null, - null); + this.connection.addHandler(this.onMute.bind(this), + 'http://jitsi.org/jitmeet/audio', + 'iq', + 'set', + null, + null); }, - setMute: function(jid, mute) { + setMute: function (jid, mute) { var iq = $iq({to: jid, type: 'set'}) .c('mute', {xmlns: 'http://jitsi.org/jitmeet/audio'}) .t(mute.toString()) @@ -39,14 +32,14 @@ Strophe.addConnectionPlugin('moderate', { "participant" + '.', error); }); }, - onMute: function(iq) { + onMute: function (iq) { var mute = $(iq).find('mute'); if (mute.length) { toggleAudio(); } return true; }, - eject: function(jid) { + eject: function (jid) { connection.jingle.terminateRemoteByJid(jid, 'kick'); connection.emuc.kick(jid); }