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

Update SC availability taking into account 'transferring' state #1146

Conversation

igorkravchenko
Copy link
Contributor

MOB-3654

What was solved?
Add 'transferring' and 'engagement.capabilities.text == true' to be used for SC availability.

Release notes:

  • Feature
  • Ignore
  • Release notes (Is it clear from the description here?)
  • Migration guide (If changes are needed for integrator already using the SDK - what needs to be communicated? Add underneath please)

Additional info:

  • 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 iOS SDKsThings to consider for newly added logs in Confluence for more information.

Screenshots:

@EgorovEI EgorovEI force-pushed the fix/MOB-3834-hide-unavailablity-banner branch 2 times, most recently from 837ddbc to 75ecd0d Compare December 6, 2024 08:45
Base automatically changed from fix/MOB-3834-hide-unavailablity-banner to feature/entry-widget-and-secure-conversations-v2 December 6, 2024 11:35
@igorkravchenko igorkravchenko force-pushed the task/MOB-3654-update-sc-availability-check branch 2 times, most recently from aada08d to 75698b5 Compare December 6, 2024 12:32
@igorkravchenko igorkravchenko marked this pull request as ready for review December 6, 2024 12:34
if let engagement = environment.getCurrentEngagement(),
engagement.status == .transferring,
engagement.capabilities?.text == true {
completion(.success(.available(queueIds: [])))
Copy link
Contributor

Choose a reason for hiding this comment

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

is it intentional to pass an empty array of queueIds?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, because in case of transferring there are no queues with messaging. This is also visible from the check above:

 guard !filteredQueues.isEmpty else {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@EgorovEI @ykyivskyi-gl @rasmustautsglia Perhaps it make sense to return different result case for clarity?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, having dedicated enum case for this case would be much more understandable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ykyivskyi-gl @EgorovEI @rasmustautsglia Added 'transferred' available state 9cdb97d.

Copy link
Contributor

@ykyivskyi-gl ykyivskyi-gl left a comment

Choose a reason for hiding this comment

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

Looks good. Just an optional comment,

@@ -85,6 +98,15 @@ extension SecureConversations.Availability {
return false
}
}

var isAvailable: Bool {
switch self {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a matter of readability for me, self == .available looks a bit straightforward.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ykyivskyi-gl It has associated values, so compiler needs honest switch there, self == .available will not compile.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, indeed

@igorkravchenko
Copy link
Contributor Author

!squash

Add 'transferring' and 'engagement.capabilities.text == true' to be used for SC availability.

MOB-3654
@sm-deployer sm-deployer force-pushed the task/MOB-3654-update-sc-availability-check branch from 9cdb97d to 2fe7e37 Compare December 9, 2024 17:07
@igorkravchenko igorkravchenko merged commit e8b2a4a into feature/entry-widget-and-secure-conversations-v2 Dec 9, 2024
8 checks passed
@igorkravchenko igorkravchenko deleted the task/MOB-3654-update-sc-availability-check branch December 9, 2024 17:34
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.

4 participants