Skip to content

Commit 73d0ff4

Browse files
authored
Merge pull request react-native-webrtc#9 from wazo-pbx/fix_dtmf
Fix DTMF retrieval
2 parents 06b5c47 + 2a59bbb commit 73d0ff4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

actions.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,24 @@ const answerCall = handler =>
3232
eventEmitter.addListener(RNCallKeepPerformAnswerCallAction, (data) => handler(isIOS ? data : {}));
3333

3434
const endCall = handler =>
35-
eventEmitter.addListener(RNCallKeepPerformEndCallAction, (data) => { handler(isIOS ? data : {}); });
35+
eventEmitter.addListener(RNCallKeepPerformEndCallAction, (data) => handler(isIOS ? data : {}));
3636

3737
const didActivateAudioSession = handler =>
38-
eventEmitter.addListener(RNCallKeepDidActivateAudioSession, () => { handler(); });
38+
eventEmitter.addListener(RNCallKeepDidActivateAudioSession, handler);
3939

4040
const didDisplayIncomingCall = handler =>
41-
eventEmitter.addListener(RNCallKeepDidDisplayIncomingCall, (data) => { handler(isIOS ? data.error : null); });
41+
eventEmitter.addListener(RNCallKeepDidDisplayIncomingCall, (data) => handler(isIOS ? data.error : null));
4242

4343
const didPerformSetMutedCallAction = handler =>
44-
eventEmitter.addListener(RNCallKeepDidPerformSetMutedCallAction, (data) => { handler(data.muted); });
44+
eventEmitter.addListener(RNCallKeepDidPerformSetMutedCallAction, (data) => handler(data.muted));
4545

4646
const didPerformDTMFAction = handler => {
4747
// @TODO: handle DTMF on iOS
4848
if (isIOS) {
4949
return;
5050
}
5151

52-
eventEmitter.addListener(RNCallKeepDidPerformDTMFAction, (data) => { handler(data.number); });
52+
eventEmitter.addListener(RNCallKeepDidPerformDTMFAction, handler);
5353
};
5454

5555
export const listeners = {

0 commit comments

Comments
 (0)