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 method on your kindlysdkinteraction implementation synchronously before opening the link scenario result interface 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 interface kindlysdk `interface` = object kindlysdkinteraction { override fun didpressbutton(chatbutton buttonchat, chatlog list\<messagechat>) { // handle button press if needed } override fun shouldhandlelink(url string) boolean { // example intercept links to your own domain if (url contains("www example com")) { // handle the link yourself (e g , navigate within your app) navigatetointernalpage(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 override 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, carousel card links, source reference links, and maintenance page links