"use strict";var cov_twt5lfwos=function(){var path="/Users/josh.burman/Projects/braid/dist/server/channels/sites/mhschannel.js";var hash="089a16bb60cc96c4f040dce587e1f682faf5073e";var Function=function(){}.constructor;var global=new Function("return this")();var gcv="__coverage__";var coverageData={path:"/Users/josh.burman/Projects/braid/dist/server/channels/sites/mhschannel.js",statementMap:{"0":{start:{line:2,column:0},end:{line:2,column:62}},"1":{start:{line:3,column:22},end:{line:3,column:47}},"2":{start:{line:4,column:13},end:{line:4,column:36}},"3":{start:{line:7,column:8},end:{line:15,column:9}},"4":{start:{line:8,column:12},end:{line:14,column:13}},"5":{start:{line:9,column:16},end:{line:9,column:40}},"6":{start:{line:10,column:16},end:{line:10,column:86}},"7":{start:{line:13,column:16},end:{line:13,column:105}},"8":{start:{line:16,column:8},end:{line:16,column:80}},"9":{start:{line:20,column:0},end:{line:20,column:28}},"10":{start:{line:21,column:0},end:{line:21,column:29}}},fnMap:{"0":{name:"(anonymous_0)",decl:{start:{line:6,column:4},end:{line:6,column:5}},loc:{start:{line:6,column:36},end:{line:17,column:5}},line:6}},branchMap:{"0":{loc:{start:{line:8,column:12},end:{line:14,column:13}},type:"if",locations:[{start:{line:8,column:12},end:{line:14,column:13}},{start:{line:8,column:12},end:{line:14,column:13}}],line:8},"1":{loc:{start:{line:8,column:16},end:{line:8,column:68}},type:"binary-expr",locations:[{start:{line:8,column:16},end:{line:8,column:30}},{start:{line:8,column:34},end:{line:8,column:68}}],line:8}},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0},f:{"0":0},b:{"0":[0,0],"1":[0,0]},_coverageSchema:"43e27e138ebf9cfc5966b082cf9a028302ed4184"};var coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();cov_twt5lfwos.s[0]++;Object.defineProperty(exports,"__esModule",{value:true});const channelBase_1=(cov_twt5lfwos.s[1]++,require("../channelBase"));var logger=(cov_twt5lfwos.s[2]++,require('../../logger'));class MHSChannel extends(channelBase_1.default){broadcastMessage(from,message){cov_twt5lfwos.f[0]++;cov_twt5lfwos.s[3]++;for(let client of this.clients){cov_twt5lfwos.s[4]++;if((cov_twt5lfwos.b[1][0]++,client!=from)&&(cov_twt5lfwos.b[1][1]++,client.data.user_type=='teacher')){cov_twt5lfwos.b[0][0]++;cov_twt5lfwos.s[5]++;client.ws.send(message);cov_twt5lfwos.s[6]++;logger.accessLog.info(`sent to ${client.id}: `,{message:message});}else{cov_twt5lfwos.b[0][1]++;cov_twt5lfwos.s[7]++;logger.accessLog.info(`client is same as sender: ${client.id} - `,{message:message});}}cov_twt5lfwos.s[8]++;return{'status':'success','message':`message broadcast complete`};}};cov_twt5lfwos.s[9]++;module.exports=MHSChannel;cov_twt5lfwos.s[10]++;exports.default=MHSChannel;//# sourceMappingURL=mhsChannel.js.map