twilio / twilio-voice-react-native

Other
62 stars 22 forks source link

[VBLOCKS-2830] Remove custom twiml parameter displayName functionality #339

Closed mhuynh5757 closed 3 months ago

mhuynh5757 commented 3 months ago

Submission Checklist

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

Description

This PR removes the custom display name TwiML parameter functionality, such that passing "displayName" as a TwiML parameter will override the notification.

Breakdown

Validation

The following scenarios were tested using the test app:

[x] android
  [x] incoming call with twiml param
    [x] native accept
      [x] local disconnect
      [x] remote disconnect
    [x] native reject
    [x] js accept
      [x] local disconnect
      [x] remote disconnect
    [x] js reject
    [x] cancel
  [x] incoming call without twiml param
    [x] native accept
      [x] local disconnect
      [x] remote disconnect
    [x] native reject
    [x] js accept
      [x] local disconnect
      [x] remote disconnect
    [x] js reject
    [x] cancel
  [x] outgoing call
    [x] accept
      [x] local disconnect
      [x] remote disconnect
    [x] reject
    [x] cancel

[x] ios
  [x] incoming call with twiml param
    [] native accept
      [x] local disconnect
      [x] remote disconnect
    [x] native reject
    [x] js accept
      [x] local disconnect
      [x] remote disconnect
    [x] js reject
    [x] cancel
  [x] incoming call without twiml param
    [x] native accept
      [x] local disconnect
      [x] remote disconnect
    [x] native reject
    [x] js accept
      [x] local disconnect
      [x] remote disconnect
    [x] js reject
    [x] cancel
  [x] outgoing call
    [x] accept
      [x] local disconnect
      [x] remote disconnect
    [x] reject
    [x] cancel

Additional Notes

We can't write automated tests for this at the moment because Detox has no way of interacting with the native notification UI/UX.

periabyte commented 3 months ago

@mhuynh5757, since this is removed how can we update the name in the notifications if what we use as client id is an actual id? e.g. client:1 based on this twiml

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Dial answerOnBridge="true" callerId="client:1" record="do-not-record">
        <Client>
            <Identity>client-2</Identity>
        </Client>
    </Dial>
</Response>