Skip to content

Commit

Permalink
Integrate isAgent flag for Agent connect
Browse files Browse the repository at this point in the history
  • Loading branch information
KartheekPa-Kore committed Sep 18, 2024
1 parent 5ba9819 commit ba864d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Enable the webhook channel - This should be either true (in case of Webhook conn
#### 1. Setup KoreBotSDK
###### a. Using SPM
dependencies: [
.package(url: "https://github.com/Koredotcom/iOS-kore-sdk", .upToNextMajor(from: "1.0.8"))
.package(url: "https://github.com/Koredotcom/iOS-kore-sdk", .upToNextMajor(from: "1.0.9"))
]
###### b. In your ViewController add below lines
1. import KoreBotSDK
Expand Down
4 changes: 3 additions & 1 deletion Sources/KoreBotSDK/AppKit/Common/KABotClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,9 @@ open class KABotClient: NSObject {
textComponent.payload = tText
textMessage?.addComponent(textComponent)
}

if let isAgent = dictionary["isAgent"] as? Bool, isAgent == true{
isAgentConnect = true
}
if templateType == "SYSTEM" || templateType == "live_agent" || templateType == ""{
let textComponent = Component(.text)
let text = dictionary["text"] as? String ?? ""
Expand Down

0 comments on commit ba864d4

Please sign in to comment.