Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -585,9 +585,6 @@ export default class CallMonitor extends RcModule {
return this._selectors.otherDeviceCalls();
}

get lastCallInfo() {
return this._selectors.lastCallInfo();
}
@getter
ringoutRingCalls = createSelector(
() => this.otherDeviceCalls,
Expand All @@ -600,7 +597,7 @@ export default class CallMonitor extends RcModule {
() => this.otherDeviceCalls,
otherDeviceCalls => otherDeviceCalls.filter(callItem =>
!isRingingInboundCall(callItem) &&
!isRingOutOnHold(callItem)
!isRingOutOnHold(callItem)
)
);
@getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function App({
brandIcon: icon
};
const getAvatarUrl = async (contact) => {
const avatarUrl = await phone.contacts.getProfileImage(contact, false);
const avatarUrl = await phone.contacts.getProfileImage(contact, true);
return avatarUrl;
};
return (
Expand Down
18 changes: 16 additions & 2 deletions packages/ringcentral-widgets/containers/ActiveCallsPage/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { connect } from 'react-redux';
import formatNumber from 'ringcentral-integration/lib/formatNumber';
import callDirections from 'ringcentral-integration/enums/callDirections';
import { isRinging, isRingingInboundCall } from 'ringcentral-integration/lib/callLogHelpers';
import callingModes from 'ringcentral-integration/modules/CallingSettings/callingModes';
import { withPhone } from '../../lib/phoneContext';
Expand Down Expand Up @@ -87,8 +88,21 @@ function mapToFunctions(_, {
countryCode: regionSettings.countryCode,
});
},
async webphoneAnswer(...args) {
return (webphone && webphone.answer(...args));
async webphoneAnswer(sessionId) {
if (!webphone) {
return;
}

const session = webphone.sessions.find(session => session.id === sessionId);
if (
conferenceCall &&
session &&
session.direction === callDirections.inbound
) {
conferenceCall.closeMergingPair();
}

webphone.answer(sessionId);
},
async webphoneToVoicemail(...args) {
return (webphone && webphone.toVoiceMail(...args));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ function mapToFunctions(_, {
webphone,
regionSettings,
contactSearch,
conferenceCall,
},
getAvatarUrl = () => null,
}) {
Expand All @@ -248,7 +249,12 @@ function mapToFunctions(_, {
areaCode: regionSettings.areaCode,
countryCode: regionSettings.countryCode,
}),
answer: sessionId => webphone.answer(sessionId),
answer(sessionId) {
if (conferenceCall) {
conferenceCall.closeMergingPair();
}
webphone.answer(sessionId);
},
reject: sessionId => webphone.reject(sessionId),
toVoiceMail: sessionId => webphone.toVoiceMail(sessionId),
onForward: (sessionId, forwardNumber) => webphone.forward(sessionId, forwardNumber),
Expand Down