[RN] No CallKit failure on recoverable errors

This commit is contained in:
Lyubo Marinov 2017-10-19 13:29:25 -05:00
parent 4f2346aac9
commit 6f0fe06ba6
1 changed files with 8 additions and 3 deletions

View File

@ -135,10 +135,15 @@ function _appWillMount({ dispatch, getState }, next, action) {
function _conferenceFailed(store, next, action) {
const result = next(action);
const { callUUID } = action.conference;
// XXX Certain CONFERENCE_FAILED errors are recoverable i.e. they have
// prevented the user from joining a specific conference but the app may be
// able to eventually join the conference.
if (!action.error.recoverable) {
const { callUUID } = action.conference;
if (callUUID) {
CallKit.reportCallFailed(callUUID);
if (callUUID) {
CallKit.reportCallFailed(callUUID);
}
}
return result;