From 5ede58fb2136c2ac30d940c8286f77749ed83006 Mon Sep 17 00:00:00 2001 From: Kartheek Pagidimarri Date: Thu, 3 Oct 2024 15:38:04 +0530 Subject: [PATCH] Added callback notification for close and minimse --- Sources/KoreBotSDK/AppKit/Common/BotConnect.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/KoreBotSDK/AppKit/Common/BotConnect.swift b/Sources/KoreBotSDK/AppKit/Common/BotConnect.swift index 9057a566..7fe3a7e4 100644 --- a/Sources/KoreBotSDK/AppKit/Common/BotConnect.swift +++ b/Sources/KoreBotSDK/AppKit/Common/BotConnect.swift @@ -54,6 +54,8 @@ open class BotConnect: NSObject { botViewController.closeAndMinimizeEvent = { [weak self] (Dic) in if let dic = Dic { + let jsonString = Utilities.stringFromJSONObject(object: dic) + NotificationCenter.default.post(name: Notification.Name("ChatbotCallBackNotification"), object: jsonString) if self?.closeOrMinimizeEvent != nil{ self?.closeOrMinimizeEvent(dic) }