How to receive notification when closing SBUOpenChannelViewController?


My chat consist of one SBUOpenChannelViewController and I need to get notification/callback when chat user tapped to close the chat. Here is how I currently getting that notification:

extension OpenChannelNavigationController {
    open override func viewDidDisappear(_ animated: Bool) {
        super.viewDidDisappear(animated) NSNotification.Name(Constants.openChannelDidDismissNotification),
                                        object: nil)

It works well but the issue is when I try to use camera in chat, then this notification triggers that is not correct in my case.

Perhaps there is another solution I could use to determinate when user exits the channel?

Thank you.