cybex-dev / twilio_voice

Flutter Twilio Voice Plugin
https://twilio-voice-web.web.app/
MIT License
39 stars 79 forks source link

Add Call Direction in sendPhoneCallEvents description to fix customPa… #233

Open agent515 opened 3 months ago

agent515 commented 3 months ago

…rams being null in Active Call on Answer.

Fixes #232

Call Direction is added to the Call Event log to satisfy tokens.length == 5 condition in parseCustomParams().

Map<String, dynamic>? parseCustomParams(List<String> tokens) {
  if (tokens.length != 5) return null;
  try {
    Map<String, dynamic> customValue = jsonDecode(tokens[4]);
    return customValue;
  } catch (error) {
    return null;
  }
}
cybex-dev commented 3 months ago

Thank you for the PR - will review and merge this week.