Skip to content

Add persistentId field in Message for common attribute #62

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

Merged
merged 1 commit into from
Jun 4, 2025

Conversation

saipreetham16
Copy link
Contributor

Issue Number: #55

Description:

What are the changes? Why are we making them?
This change introduces a new field called persistentId to the Message object. The persistentId can be used by customers to consistently track messages, as it will remain the same during both message initiation and creation.

Functional backward compatibility:

Does this change introduce backwards incompatible changes? [YES/NO]
YES

Does this change introduce any new dependency? [YES/NO]
NO


Testing:

Is the code unit tested?
Yes this code i s tested locally
Have you tested the changes with a sample UI (e.g. Android Mobile Chat Example)?
No

List manual testing steps:

  • Add Steps below:
  • Initiated message creation with persistentId set to the same value as message Id.
  • Verified that transcript messages retain the same persistentId during message creation

Here are a list of manual test cases to run through:

  • Initiating chat and connecting with an agent
  • Retrieving transcript
  • Disconnecting from chat
  • Sending a message to the agent
    • See typing bubbles on agent side
    • See read/delivered receipt on client side
    • Receiving a message from the agent
    • See typing bubbles on client side
    • See read/delivered receipt on agent side
    • Sending an attachment to the agent (try .txt, .pdf, .jpg)
    • Preview the attachment on click
    • Receiving an attachment from the agent
    • Preview the attachment on click
  • Close the application (Without ending chat) → open app again → Start chat → Should Retrieve transcript from a previous chat session

@saipreetham16 saipreetham16 requested a review from a team as a code owner May 28, 2025 16:24
@saipreetham16 saipreetham16 force-pushed the sleburu/identifier branch 2 times, most recently from 256b970 to d1c95b2 Compare June 2, 2025 19:01
) : TranscriptItemProtocol {

internal fun updateId(newId: String) {
this.id = newId
}

internal fun updatePersistentId() {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we always want this to be triggered when Id is updated right? Can we just do it as part of updateId() function above instead of called separately?

haomingli2020
haomingli2020 previously approved these changes Jun 2, 2025
spenlep-amzn
spenlep-amzn previously approved these changes Jun 3, 2025
@saipreetham16 saipreetham16 merged commit 09244e7 into main Jun 4, 2025
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.

4 participants