(event, data)
| 55 | }, |
| 56 | |
| 57 | _onRoomUserChanged(event, data) { |
| 58 | const peers = this.model; |
| 59 | const peer = peers.findBy('uuid', data.uuid); |
| 60 | const peerAttrs = data.peer; |
| 61 | const defaults = { |
| 62 | uuid: null, |
| 63 | public_ip: null, |
| 64 | }; |
| 65 | |
| 66 | if (peer) { |
| 67 | // eslint-disable-next-line no-param-reassign |
| 68 | delete data.peer; |
| 69 | // Firebase doesn't return keys with null values, |
| 70 | // so we have to add them back. |
| 71 | peer.setProperties($.extend({}, defaults, data)); |
| 72 | peer.get('peer').setProperties(peerAttrs); |
| 73 | } |
| 74 | }, |
| 75 | |
| 76 | _onRoomUserRemoved(event, data) { |
| 77 | const peers = this.model; |
nothing calls this directly
no outgoing calls
no test coverage detected