Skip to content
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

Feat/conversation event transcoding capability endpoints #43

Merged
merged 25 commits into from
Mar 20, 2024

Conversation

Dovchik
Copy link
Contributor

@Dovchik Dovchik commented Feb 22, 2024

Covers: conversation/events get, list, delete, send
conversation/conversation inject-event

Add APPLEBC into list of Channels

CI blocked by https://github.com/sinch/doppelganger/pull/13

@Dovchik Dovchik marked this pull request as ready for review March 12, 2024 11:51
thanks you system.text.json
@Dovchik
Copy link
Contributor Author

Dovchik commented Mar 18, 2024

Latest commit makes InjectEvent to take conversationId as a param and not included in the request object due to system.text.json limitations

@Dovchik Dovchik requested a review from asein-sinch March 18, 2024 13:59
@@ -244,20 +245,19 @@ public Task Stop(string conversationId, CancellationToken cancellationToken = de
}

/// <inheritdoc />
public Task<InjectEventResponse> InjectEvent(InjectEventRequest injectEventRequest,
public Task<InjectEventResponse> InjectEvent(string conversationId, InjectEventRequest injectEventRequest,
Copy link

@asein-sinch asein-sinch Mar 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need to extract this parameter from InjectEventRequest ? I see the comment about the limitations of system.text.json, but it becomes inconsistent with "injectMessage"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The behavior is counterintuitive, If field is marked required and JsonIgnore at the same type this throws a runtime error from json serializer. I'll include conversationId in request class. Also, there will be task to harmonize approach inside all over the solution

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the curious - dotnet/runtime#82879

@Dovchik Dovchik requested a review from asein-sinch March 20, 2024 11:04
if (string.IsNullOrEmpty(conversationId))
throw new ArgumentNullException(nameof(conversationId));
if (string.IsNullOrEmpty(injectEventRequest.ConversationId))
throw new NullReferenceException($"{nameof(injectEventRequest.ConversationId)} is required.");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit. the exception message is different from InjectMessage

@Dovchik Dovchik merged commit 58b2ece into main Mar 20, 2024
3 checks passed
@Dovchik Dovchik deleted the feat/conversation-event-transcoding-capability-endpoints branch March 20, 2024 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants