properly delegate to sub classes for channels and clients

This commit is contained in:
Josh Burman
2019-03-11 16:55:44 -04:00
parent cdd6179992
commit 74aad4a957
11 changed files with 66 additions and 44 deletions

View File

@ -4,7 +4,7 @@ const channelBase_1 = require("../channelBase");
class MHSChannel extends channelBase_1.default {
broadcastMessage(from, message) {
for (let client of this.clients) {
if (client != from) {
if (client != from && client.data.user_type == 'teacher') {
client.ws.send(message);
console.log(`sent to ${client.id}: %s`, message);
console.log(message);
@ -16,5 +16,6 @@ class MHSChannel extends channelBase_1.default {
}
}
;
module.exports = MHSChannel;
exports.default = MHSChannel;
//# sourceMappingURL=mhsChannel.js.map