foundersandcoders / Live-Peers

2 stars 2 forks source link

Update Comms function #59

Closed njsfield closed 7 years ago

njsfield commented 7 years ago

Our Chat/WebRTC modules are classes, and will be created with Comms instances in their constructors.

So for our comms.js module instead of this-

self.handlers[msg.app + '.' + msg.method](this, msg.from, msg.params);

The comms.js will be calling its handlers like this-

self.handlers[msg.app + '.' + msg.method](msg.from, msg.params);

The comms module should also be updated to class syntax