Skip to content

Commit 08088d2

Browse files
committed
Make ios dtmf payload as same as android
1 parent a04cf4a commit 08088d2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

actions.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,12 @@ const didDisplayIncomingCall = handler =>
4343
const didPerformSetMutedCallAction = handler =>
4444
eventEmitter.addListener(RNCallKeepDidPerformSetMutedCallAction, (data) => handler(data.muted));
4545

46-
const didPerformDTMFAction = handler => {
47-
eventEmitter.addListener(RNCallKeepDidPerformDTMFAction, handler);
48-
};
46+
const didPerformDTMFAction = handler =>
47+
eventEmitter.addListener(RNCallKeepDidPerformDTMFAction, (data) => {
48+
const payload = isIOS ? { dtmf: data.digits, callUUID: data.callUUID } : data;
49+
50+
return handler(payload);
51+
});
4952

5053
export const listeners = {
5154
didReceiveStartCallAction,

0 commit comments

Comments
 (0)