Skip to content

Commit

Permalink
fix: update voice report contract implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyMelton committed Apr 19, 2024
1 parent 4efa067 commit f905e97
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ public VoiceDeliveryReport(string EventName, string? ChannelId, string? ChannelP

public string? From => this.Infobip().Voice.From;

public TimeSpan Duration => TimeSpan.FromSeconds(this.Infobip().Voice?.VoiceCall?.Duration ?? 0);
public TimeSpan? Duration
{
get
{
var duration = this.Infobip().Voice?.VoiceCall?.Duration;
if (!duration.HasValue)
return null;
return TimeSpan.FromSeconds(duration.Value);
}
}
}
}

0 comments on commit f905e97

Please sign in to comment.