You need to look into a presence channel. This will tell you if the user is connected.
Send email if user is not currently logged in.
Hi everyone i have specific use case where i want to send to users which are not currently logged in an email and for the ones how are logged i i am using pusher to notify them immediately. So it's like a chat thing however when someone send a dm on that specific user and he is not online i want to notify him through email otherwise i will notify him with pusher.
Has anyone done anything like this previously and did you achieve it? my current workflow is storing a session for 1 min that this specific user is online and every time a page changes i am refreshing that session for another min.
Although I am not 100% sure if this is the best way and if there is any better way of dealing with this.
Thank you very much!
Please or to participate in this conversation.