-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feat/conversation event transcoding capability endpoints #43
Conversation
move agent to conversation/common namespace add test of Transcoding
src/Sinch/Conversation/Conversations/InjectEvent/InjectEventRequest.cs
Outdated
Show resolved
Hide resolved
thanks you system.text.json
Latest commit makes InjectEvent to take conversationId as a param and not included in the request object due to system.text.json limitations |
@@ -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, |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
if (string.IsNullOrEmpty(conversationId)) | ||
throw new ArgumentNullException(nameof(conversationId)); | ||
if (string.IsNullOrEmpty(injectEventRequest.ConversationId)) | ||
throw new NullReferenceException($"{nameof(injectEventRequest.ConversationId)} is required."); |
There was a problem hiding this comment.
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
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