-
Notifications
You must be signed in to change notification settings - Fork 5
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
Update SC availability taking into account 'transferring' state #1146
Conversation
837ddbc
to
75ecd0d
Compare
aada08d
to
75698b5
Compare
if let engagement = environment.getCurrentEngagement(), | ||
engagement.status == .transferring, | ||
engagement.capabilities?.text == true { | ||
completion(.success(.available(queueIds: []))) |
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.
is it intentional to pass an empty array of queueIds
?
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.
Yes, because in case of transferring there are no queues with messaging. This is also visible from the check above:
guard !filteredQueues.isEmpty else {
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.
@EgorovEI @ykyivskyi-gl @rasmustautsglia Perhaps it make sense to return different result case for clarity?
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.
Sure, having dedicated enum case for this case would be much more understandable
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.
@ykyivskyi-gl @EgorovEI @rasmustautsglia Added 'transferred' available state 9cdb97d.
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.
Looks good. Just an optional comment,
@@ -85,6 +98,15 @@ extension SecureConversations.Availability { | |||
return false | |||
} | |||
} | |||
|
|||
var isAvailable: Bool { | |||
switch self { |
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.
Just a matter of readability for me, self == .available
looks a bit straightforward.
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.
@ykyivskyi-gl It has associated values, so compiler needs honest switch
there, self == .available
will not compile.
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.
Hm, indeed
!squash |
Add 'transferring' and 'engagement.capabilities.text == true' to be used for SC availability. MOB-3654
9cdb97d
to
2fe7e37
Compare
e8b2a4a
into
feature/entry-widget-and-secure-conversations-v2
MOB-3654
What was solved?
Add 'transferring' and 'engagement.capabilities.text == true' to be used for SC availability.
Release notes:
Additional info:
Screenshots: