Finished nc (notification center topic style refactoring) - fixes #60

This commit is contained in:
logsol 2014-03-17 23:12:08 +01:00
parent cacd5d74c0
commit 76d9450257
9 changed files with 67 additions and 30 deletions

View file

@ -37,7 +37,15 @@ function (Nc, Channel) {
};
PipeToServer.prototype.onMessage = function (message) {
Nc.trigger(Nc.ns.channel.events.controlCommand + recipient, message);
switch(message.recipient) {
case 'channel':
Nc.trigger(Nc.ns.channel.events.controlCommand.channel, message);
break;
default:
Nc.trigger(Nc.ns.channel.events.controlCommand.user + message.recipient, message);
break;
}
}
PipeToServer.prototype.destroy = function() {