-
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
SendMessageReceipt Update + Adding GitHub README #30
Conversation
96d50cd
to
568db6b
Compare
} | ||
// Check if the transcript item is a plain text message, is not empty, and is incoming | ||
if (messageItem == null || messageItem.text.isEmpty() || messageItem.participant == "CUSTOMER") { | ||
return@withContext Result.failure<Boolean>(IllegalArgumentException("Invalid message item. Cannot send message receipts for outgoing or empty messages.")) |
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.
Do we need to do this? It might spam logs
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.
I think it should be fine. I don't think the empty message or null message path will be hit very much. It would only spam if they are sending message receipts for all end customer messages, and it would make sense for us to surface an exception instead of the customer wondering why a message receipt wasn't sent.
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.
Make sense
Issue Number:
Description:
What are the changes? Why are we making them?
Changing return type of
sendMessageReceipt
to beResult<Boolean>
to match the other SDK APIs.GitHub README update
Testing: