OneSignal / react-onesignal

React OneSignal Module: Make it easy to integrate OneSignal with your React App!
Other
73 stars 26 forks source link

[Question]: How to mute notification when user on a specific page? #123

Closed asaadbaw closed 1 month ago

asaadbaw commented 1 year ago

How can we help?

Hello,

I am currently using React.js to build a chat page, and I am looking to implement a feature that mutes notifications when the user is actively engaged in the chat. I'm seeking functionality akin to the following:

OneSignal.inFocusDisplaying();

sergio-dd commented 11 months ago

Hellow, any update, I have the same problem, I also have a chat system.

jennantilla commented 1 month ago

Hello there! Apologies for the delay in response. In our latest SDK major version, we have the foregroundWillDisplay method which sounds like it may work for your use case. Please see our migration guide for information on upgrading. Thanks!