I have created a internal chat application on my site and I allow members to talk one on one. So lets say member A is talking to member B. I want it so that if member A logs off when member B sends a message I can send them an email saying they have a new message.
Ideally if i could use something like this…
let user = wixUsers.currentUser;
let isLoggedIn = user.loggedIn;
But that only works for the current user. If there was something more like this…
let user = wixUsers.User(user's_ID or owner);
let isLoggedIn = user.loggedIn;
Thanks for sharing. I have seen that thread. Very useful for creating the chat messenger.
I have already created the chat messenger.
I wanted to add on to it.
So for example even in this chat. You sent me this message 40 minutes ago. I was actually away from my screen. But i got an email from wix saying someone had commented on my post.
Thats what i want to do. When two people are using the chat but one person is away from their computer or logged out or not in front of their screen etc. I want to send them an email saying they have a message
Took a closer look at both. Not sure I can use either. But i could be missing something.
My problem isn’t how to send and email.
My problem, is that I only want to send a single email when one person in the chat is offline. Just to let them know they got a message. Once they log back in or for future messages they get while offline, they don’t get another email.
I am not sure how to find out if another member is logged in or not.