From 7de136a9308ca9051739bbd54792b5c68fd52266 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 1 Oct 2015 10:19:18 +0100 Subject: [PATCH] Port over new logic for filtering actions: makes the end call button appear & disappear approriately --- src/controllers/molecules/RoomHeader.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/controllers/molecules/RoomHeader.js b/src/controllers/molecules/RoomHeader.js index 5c4db3a92e..d3afce1e49 100644 --- a/src/controllers/molecules/RoomHeader.js +++ b/src/controllers/molecules/RoomHeader.js @@ -57,15 +57,12 @@ module.exports = { }, onAction: function(payload) { - // if we were given a room_id to track, don't handle anything else. - if (payload.room_id && this.props.room && - this.props.room.roomId !== payload.room_id) { + // don't filter out payloads for room IDs other than props.room because + // we may be interested in the conf 1:1 room + if (payload.action !== 'call_state' || !payload.room_id) { return; } - if (payload.action !== 'call_state') { - return; - } - var call = CallHandler.getCall(payload.room_id); + var call = CallHandler.getCallForRoom(payload.room_id); var callState = call ? call.call_state : "ended"; this.setState({ call_state: callState