-
Notifications
You must be signed in to change notification settings - Fork 40
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
[CM-1954] Dynamic online/offline status #402
Conversation
|
||
weak var delegate: KMUpdateAssigneeStatusDelegate? | ||
|
||
public var channelID: Int? |
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.
We can add assignee id as well
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.
updated
/// - channelID: The Channel ID parameter is required to match the conversation in which the status needs to be updated. If the Channel ID is not provided, the status will be updated in all conversations. | ||
/// - status: A predefined status among 'Online', 'Offline', 'Away', and 'Default'. The 'Default' status corresponds to the assignee status fetched from MQTT. | ||
open class func updateAssigneeStatus(channelID: Int = 0, status: KMUserStatus) { | ||
KMUpdateAssigneeStatus.shared.channelID = channelID |
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.
Can't we wrap it in single call ?
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.
changed the channelID with assigneeID
@@ -362,7 +374,35 @@ open class KMConversationViewController: ALKConversationViewController { | |||
self.assigneeUserId = contact?.userId | |||
self.hideInputBarIfAssignedToBot() | |||
guard let contact = contact else {return} | |||
self.isAwayMessageViewHidden = !contact.isInAwayMode | |||
guard let assigneeUserId = self.assigneeUserId, ( assigneeUserId == KMUpdateAssigneeStatus.shared.assigneeID || KMUpdateAssigneeStatus.shared.assigneeID == "") 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.
use empty check here
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.
added the Check
Summary