NotificationCenter.default.addObserver(
forName: NSNotification.Name(rawValue: KMConversationViewConfiguration().conversationLaunchNotificationName),
object: nil, queue: nil) { (notification) in
guard let info = notification.userInfo,
let conversationId = info["ConversationId"] else { return }
print("Conversation launched and the conversation Id is: ", conversationId)
}
NotificationCenter.default.addObserver(
forName: NSNotification.Name(rawValue: KMConversationViewConfiguration().backButtonNotificationName),
object: nil, queue: nil) { (notification) in
guard let info = notification.userInfo,
let conversationId = info["ConversationId"] else { return }
print("Conversation closed and the conversation Id is: ", conversationId)
}