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

SendMessageReceipt Update + Adding GitHub README #30

Merged
merged 7 commits into from
Oct 14, 2024

Conversation

mliao95
Copy link
Contributor

@mliao95 mliao95 commented Oct 10, 2024

Issue Number:

Description:

What are the changes? Why are we making them?

Changing return type of sendMessageReceipt to be Result<Boolean> to match the other SDK APIs.

GitHub README update


Testing:

  • Tested locally + tests are passing

@mliao95 mliao95 changed the title Mikeliao/documentation update Updating GitHub README Oct 10, 2024
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@mliao95 mliao95 requested a review from mrajatttt October 11, 2024 00:42
@mliao95 mliao95 force-pushed the mikeliao/documentation-update branch from 96d50cd to 568db6b Compare October 11, 2024 01:54
@mliao95 mliao95 changed the title Updating GitHub README SendMessageReceipt Update + Adding GitHub README Oct 11, 2024
}
// 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."))
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Make sense

@mrajatttt mrajatttt self-requested a review October 12, 2024 02:00
@mliao95 mliao95 merged commit e545f9b into main Oct 14, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants