-
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
Implement EngagementLauncher business logic for ongoing live engagement #1206
base: feature/entry-widget-and-secure-conversations-v2
Are you sure you want to change the base?
Conversation
/** | ||
* Starts a chat engagement. | ||
* | ||
* @param context Activity or Context used to launch the chat screen | ||
* @param visitorContextAssetId Optional visitor context id from Glia Hub | ||
*/ | ||
fun startChat(context: Context, visitorContextAssetId: String? = null) | ||
@FeatureUnderConsiderationForRemoval |
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.
What do you think about this solution?
As the @JvmOverloads
annotation is not supported for interfaces, integrators using Java must explicitly pass null for visitorContextAssetId
. For this reason, I have defined a new function instead.
Later I added this annotation to prevent integrators from using the functions with visitorContextAssetId
until they need it. To do that, they have to mark their functions with the @OptIn(FeatureUnderConsiderationForRemoval::class)
annotation, otherwise it won't compile.
@@ -22,12 +20,19 @@ internal class HasOngoingSecureConversationUseCase( | |||
secureConversationsRepository.unreadMessagesCountObservable, | |||
engagementStateUseCase() | |||
) { pendingSecureConversations, unreadMessagesCount, state -> | |||
isAuthenticatedUseCase() && | |||
(pendingSecureConversations || unreadMessagesCount > 0 || state is State.TransferredToSecureConversation) | |||
pendingSecureConversations || unreadMessagesCount > 0 || state is State.TransferredToSecureConversation |
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.
Removed the isAuthenticatedUseCase()
check, as it was included in the unread_messages_count
observable on the core SDK side.
Jira issue:
https://glia.atlassian.net/browse/MOB-3932
What was solved?
Release notes:
Additional info:
Screenshots: