-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StartTime is not nullable in class Answered (EventWebHook) #567
Comments
Hi @MarcusKohnert, Thanks for raising that one. I'll have a look asap |
Hi @MarcusKohnert, FYI the issue is fixed - the PR is linked. |
Unblocked myself with the following workaround: EventBase eventBase;
try
{
eventBase = EventBase.ParseEvent(json);
}
catch (JsonSerializationException) // workaround https://github.com/Vonage/vonage-dotnet-sdk/issues/567
{
var callStatusEvent = JsonConvert.DeserializeObject<CallStatusEvent>(json, VonageSerialization.SerializerSettings)!;
eventBase = new Answered
{
From = callStatusEvent.From,
Uuid = callStatusEvent.Uuid,
ConversationUuid = callStatusEvent.ConversationUuid,
To = callStatusEvent.To,
Direction = callStatusEvent.Direction,
Status = callStatusEvent.Status,
DetailString = callStatusEvent.DetailString,
StartTime = DateTime.Now,
TimeStamp = callStatusEvent.TimeStamp
};
} |
I'm sorry you had to go down that route 😅 |
Hi @MarcusKohnert, I wanted to share some feedback. This breaking change is available in the latest version v7.0.0-alpha. |
Hi, v7.0.0 is finally out, and this problem has been addressed. Don't hesitate to share some feedback 😄 |
Describe the bug
I'm using the EventBase.ParseEvent method to parse the received webhook events.
Expected behaviour:
The method is able to parse an Answered event send by Vonage.
Actual behaviour:
EventBase.ParseEvent
throws an exception becausestart_time
is null and StartTime is of type DateTime (which is not nullable).StackTrace
Environment:
The text was updated successfully, but these errors were encountered: