Merge pull request #88 from Fab1en/features/fabien/87-channel-change-not-shown
[fix #87] Channel update event has no "actor" argument
This commit is contained in:
commit
c3c05ee76a
|
@ -265,7 +265,7 @@ class WorkerBasedMumbleChannel extends EventEmitter {
|
|||
|
||||
_dispatchEvent (name, args) {
|
||||
if (name === 'update') {
|
||||
let [actor, props] = args
|
||||
let [props] = args
|
||||
Object.entries(props).forEach((entry) => {
|
||||
this._setProp(entry[0], entry[1])
|
||||
})
|
||||
|
@ -276,7 +276,6 @@ class WorkerBasedMumbleChannel extends EventEmitter {
|
|||
props.links = this.links
|
||||
}
|
||||
args = [
|
||||
this._client._user(actor),
|
||||
props
|
||||
]
|
||||
} else if (name === 'remove') {
|
||||
|
|
|
@ -90,17 +90,14 @@ import 'subworkers'
|
|||
function setupChannel (id, channel) {
|
||||
id = Object.assign({}, id, { channel: channel.id })
|
||||
|
||||
registerEventProxy(id, channel, 'update', (actor, props) => {
|
||||
if (actor) {
|
||||
actor = actor.id
|
||||
}
|
||||
registerEventProxy(id, channel, 'update', (props) => {
|
||||
if (props.parent) {
|
||||
props.parent = props.parent.id
|
||||
}
|
||||
if (props.links) {
|
||||
props.links = props.links.map((it) => it.id)
|
||||
}
|
||||
return [actor, props]
|
||||
return [props]
|
||||
})
|
||||
registerEventProxy(id, channel, 'remove')
|
||||
|
||||
|
|
Loading…
Reference in a new issue