Skip to content

Migrate widgets chat send to the new unified Core API#1510

Merged
DavDo merged 1 commit into
developmentfrom
MOB-5376-migrate-chat-send-to-new-core-api
Jul 3, 2026
Merged

Migrate widgets chat send to the new unified Core API#1510
DavDo merged 1 commit into
developmentfrom
MOB-5376-migrate-chat-send-to-new-core-api

Conversation

@DavDo

@DavDo DavDo commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Jira issue:
https://glia.atlassian.net/browse/MOB-5376

What was solved?

Migrated the Widgets chat/secure-conversations send path to the new unified Core SDK send API.

  • Replaced the removed Core SendMessagePayload with a Widgets-internal sealed OutgoingMessage type (Text / SingleChoice / File, where a file's id doubles as its message id).
  • Routed chat and secure conversations sends through the new unified Core API, using separated onSuccess / onFailure lambdas instead of RequestCallback<VisitorMessage>.
  • The sent message is no longer returned on send; it is reconciled from the CHAT_MESSAGE event stream by message id.
  • The message center now sends content and all files in a single SecureConversations.sendMessageWithAttachments request (no per-message aggregation).
  • Removed the dead live-engagement branch from SendSecureMessageUseCase (and its now-unused chatRepository / IsQueueingOrLiveEngagementUseCase dependencies).
  • Core no longer marshals send callbacks to the main thread, so SecureConversationsRepository now hops its send callbacks (and the message-sending state) back onto the main thread via the injected Schedulers.

Additional info:

⚠️ This branch compiles only against the local Core SDK with the unified send API. It cannot build on CI / merge until that Core version is published.

  • Is the feature sufficiently tested? All tests fixed? Necessary unit, acceptance, snapshots added? Check that at least new public classes & methods are covered with unit tests
  • Did you add logging beneficial for troubleshooting of customer issues?
  • Did you add new logging? We would like the logging between platforms to be similar. Refer to Logging from Android SDKsThings to consider for newly added logs in Confluence for more information.

Screenshots:

N/A — no UI changes.

@DavDo DavDo requested a review from a team as a code owner June 26, 2026 12:28
@snyk-io

snyk-io Bot commented Jun 26, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@DavDo DavDo force-pushed the MOB-5376-migrate-chat-send-to-new-core-api branch 5 times, most recently from 5eb4d4f to a250dbf Compare July 3, 2026 06:05
Core removed SendMessagePayload and reworked Chat/SecureConversations
sending into per-type methods with onSuccess/onFailure callbacks.
Replace the payload with a widgets-internal OutgoingMessage
(Text/SingleChoice/File) and send text and each file attachment as
separate messages, reconciling optimistic previews with the echoed
message from the CHAT_MESSAGE stream by client message id (the file id
for attachments).

Send callbacks no longer arrive on the main thread, so
SecureConversationsRepository marshals them back to it and ChatManager
serializes all chat-state mapping on the main thread to keep the
send-success and message-echo paths from processing the same message
twice. Unit tests for the send flow updated and added.

MOB-5376
@DavDo DavDo force-pushed the MOB-5376-migrate-chat-send-to-new-core-api branch from a250dbf to 0366eec Compare July 3, 2026 08:15
@DavDo DavDo merged commit fa5951f into development Jul 3, 2026
7 checks passed
@DavDo DavDo deleted the MOB-5376-migrate-chat-send-to-new-core-api branch July 3, 2026 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants