Fix request(Un)Mute/Deaf expecting observable instead of its content

This commit is contained in:
Jonas Herzig 2018-09-24 18:06:50 +02:00
parent d7b03d2192
commit 54b62b9964
2 changed files with 12 additions and 12 deletions

View file

@ -198,16 +198,16 @@
rel="information" src="/svg/information_icon.svg">
<div class="divider"></div>
<img class="tb-mute" data-bind="visible: !selfMute(),
click: function () { requestMute(thisUser) }"
click: function () { requestMute(thisUser()) }"
rel="mute" src="/svg/audio-input-microphone.svg">
<img class="tb-unmute tb-active" data-bind="visible: selfMute,
click: function () { requestUnmute(thisUser) }"
click: function () { requestUnmute(thisUser()) }"
rel="unmute" src="/svg/audio-input-microphone-muted.svg">
<img class="tb-deaf" data-bind="visible: !selfDeaf(),
click: function () { requestDeaf(thisUser) }"
click: function () { requestDeaf(thisUser()) }"
rel="deaf" src="/svg/audio-output.svg">
<img class="tb-undeaf tb-active" data-bind="visible: selfDeaf,
click: function () { requestUndeaf(thisUser) }"
click: function () { requestUndeaf(thisUser()) }"
rel="undeaf" src="/svg/audio-output-deafened.svg">
<img class="tb-record" data-bind="click: function(){}"
rel="record" src="/svg/media-record.svg">

View file

@ -558,11 +558,11 @@ class GlobalBindings {
}
this.requestMute = user => {
if (user === this.thisUser) {
if (user === this.thisUser()) {
this.selfMute(true)
}
if (this.connected()) {
if (user === this.thisUser) {
if (user === this.thisUser()) {
this.client.setSelfMute(true)
} else {
user.model.setMute(true)
@ -571,12 +571,12 @@ class GlobalBindings {
}
this.requestDeaf = user => {
if (user === this.thisUser) {
if (user === this.thisUser()) {
this.selfMute(true)
this.selfDeaf(true)
}
if (this.connected()) {
if (user === this.thisUser) {
if (user === this.thisUser()) {
this.client.setSelfDeaf(true)
} else {
user.model.setDeaf(true)
@ -585,12 +585,12 @@ class GlobalBindings {
}
this.requestUnmute = user => {
if (user === this.thisUser) {
if (user === this.thisUser()) {
this.selfMute(false)
this.selfDeaf(false)
}
if (this.connected()) {
if (user === this.thisUser) {
if (user === this.thisUser()) {
this.client.setSelfMute(false)
} else {
user.model.setMute(false)
@ -599,11 +599,11 @@ class GlobalBindings {
}
this.requestUndeaf = user => {
if (user === this.thisUser) {
if (user === this.thisUser()) {
this.selfDeaf(false)
}
if (this.connected()) {
if (user === this.thisUser) {
if (user === this.thisUser()) {
this.client.setSelfDeaf(false)
} else {
user.model.setDeaf(false)