Link Interception
the kindly sdk allows your app to intercept links that are clicked from within the chat ui this lets you handle specific links yourself instead of letting the sdk open them how it works when a link is clicked inside the sdk (bot message links, button links, source references, etc ), the sdk calls the shouldhandlelink delegate method synchronously before opening the link scenario result delegate not set sdk handles the link normally shouldhandlelink returns true sdk handles the link normally shouldhandlelink returns false sdk does not open the link â your app handles it implementation 1\ set the delegate kindlysdk delegate = self 2\ conform to kindlychatclientdelegate extension viewcontroller kindlychatclientdelegate { func didpressbutton(chatbutton externalchatbutton, chatlog \[externalchatmessage]) { // handle button press if needed } func shouldhandlelink(url url) > bool { // example intercept links to your own domain if url host == "www example com" { // handle the link yourself (e g , navigate within your app) navigatetointernalpage(url url) return false // tell the sdk not to open it } return true // let the sdk handle all other links } } notes the shouldhandlelink method has a default implementation that returns true , so you only need to implement it if you want to intercept links the method is called synchronously â return your decision immediately this applies to all links originating from within the sdk bot message links, button links, inline html links, image links, and source reference links