Skip to content

Is this possible to use something like withEventHandler but for new messages?  #56

Description

@robsonbbs

Hi, I am using this widget without the traditional bubble button, instead, users use a custom button managed by my frontend and when they leave the chat I am doing something like this to hide the widget:

.withEventHandler(BlipChat.LEAVE_EVENT, () => {
      document.querySelector('#blip-chat-open-iframe').style.display = 'none'
})

The problem is: When my support team sends a new message if the user already closed the chat they need to tap my custom button again to check if there is any new message. What I would like to do is automatically reopens the chat after receiving a new message, this way I would call users' attention and they would know that there is a new message to them.

I know that I can use something like this to reopen the chat:

const toogleChat = () => {
    clientRef.current.toogleChat()
}

But how to trigger that once a new message was received?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions