mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 05:04:57 +08:00
Port over new logic for filtering actions: makes the end call button appear & disappear approriately
This commit is contained in:
parent
5004a3a5b3
commit
7de136a930
@ -57,15 +57,12 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onAction: function(payload) {
|
onAction: function(payload) {
|
||||||
// if we were given a room_id to track, don't handle anything else.
|
// don't filter out payloads for room IDs other than props.room because
|
||||||
if (payload.room_id && this.props.room &&
|
// we may be interested in the conf 1:1 room
|
||||||
this.props.room.roomId !== payload.room_id) {
|
if (payload.action !== 'call_state' || !payload.room_id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (payload.action !== 'call_state') {
|
var call = CallHandler.getCallForRoom(payload.room_id);
|
||||||
return;
|
|
||||||
}
|
|
||||||
var call = CallHandler.getCall(payload.room_id);
|
|
||||||
var callState = call ? call.call_state : "ended";
|
var callState = call ? call.call_state : "ended";
|
||||||
this.setState({
|
this.setState({
|
||||||
call_state: callState
|
call_state: callState
|
||||||
|
Loading…
Reference in New Issue
Block a user