Skip to main content

better_messages_chat_room_join

Triggers Javascript action when user joining chat room.

REQUIREMENTS

To be able to implement this guide, you need to learn how to use JS snippets at your website.

One of guides: https://dev.to/david_woolf/how-to-get-started-with-wordpress-hooks-in-javascript-400o

Compatibility
This hook compatible with Better Messages 2.0.68 or higher
wp.hooks.addAction('better_messages_chat_room_join', 'my_custom_actions', function (result, chat_id) {
if( result ){
console.log( 'user just joined to chat ' + chat_id )
} else {
console.log( 'user was not allowed to join to chat ' + chat_id )
}
})