Skip to content

Removed transitive dependencies, exposed method to retry undelivered … #44

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
Feb 25, 2025

Conversation

haomingli2020
Copy link
Contributor

…messages, and supported auto disconnect/reconnect on background/foreground event

Issue Number: N/A

Description:

What are the changes? Why are we making them?

  • Changed the api dependencies into compileOnlyor implementation to remove transitive dependencies that could cause conflicts at runtime.
  • Exposed method to retry undelivered text messages and attachments, and added example in App module for how to invoke it with a retry button. Also fixed a bug that thefailed status stop showing for messages that are not sent most recently.
  • Supported auto websocket disconnection/reconnection on background/foreground event (contributed by @mliao95). The logic is fully encapsulated within the SDK and enabled by default.

Functional backward compatibility:

Does this change introduce backwards incompatible changes? [NO]

Does this change introduce any new dependency? [YES]
Only added new test dependencies "mockk" for mocking static methods


Testing:

Is the code unit tested?
Yes

Have you tested the changes with a sample UI (e.g. Android Mobile Chat Example)?
Yes

List manual testing steps:

  • Add Steps below:
    • Looked at the dependency tree in Android Studio and made sure the transitive dependencies were removed
    • Manually started a chat and put the app in background, verified the websocket got disconnected in the client logs. Then brought the app to the foreground and verified the websocket got reconnected.
    • Manually started a 2way chat between customer and agent, sent a few messages, turned internet off on customer device, attempted to send a attachment and a text message and saw failures, hit the retry button and verified the text message and attachment were sent successfully and seen on agent CCP, with the old placeholders removed.
Screenshot 2025-02-24 at 11 59 13 AM Screenshot 2025-02-24 at 11 59 40 AM

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

@mliao95 mliao95 self-requested a review February 24, 2025 23:02
mliao95
mliao95 previously approved these changes Feb 24, 2025
…messages, and supported auto disconnect/reconnect on background/foreground event
@haomingli2020 haomingli2020 merged commit 9c4f1ff into main Feb 25, 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.

3 participants