Home Forums BP Better Messages Is there a custom event in BM 2.0 after a user leaves a chatroom? Reply To: Is there a custom event in BM 2.0 after a user leaves a chatroom?

#19060
Maarten
Participant

Good question, that was a bit of a creative workaround actually. I made a seperate join/leave button, which would then trigger the click events on the existing BM join/leave buttons. Then after the leave button was triggered I would wait for the bp-better-messages-reinit-end event and know that the user had just ‘left’ which meant I could trigger a redirect.

With BM 2.0 triggering the leave button doesn’t work anymore, since the leave button is only added to the DOM after clicking the 3 dots menu. But if there would be a bp-better-messages-left event, I could redirect (or do something else) whenever somebody leaves a chatroom, which would be very useful.

If it would be possible to also add a bp-better-messages-join and bp-better-messages-leave events that would trigger joining or leaving a chatroom. That would be super helpful as well.

Thank you for considering.