Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if User is online or offline? #20

Open
amare-eng opened this issue Jan 6, 2023 · 3 comments
Open

Check if User is online or offline? #20

amare-eng opened this issue Jan 6, 2023 · 3 comments

Comments

@amare-eng
Copy link

Can someone please guide/suggest me how to check if the user in Single Chat is Online/Offline?

@Abdeali099
Copy link

You can modify model of user , add filed like

isLogin : {type : bool , default:false}

And now whenever user login set this filed to true.

@RamkrushnaP2003
Copy link

can i try?

@Bucephalus-lgtm
Copy link

@RamkrushnaP2003 Try means using the Boolean flag?

That can be done, but why not use Redis?

If redis implementation seems complicated for simple usecases, we can use
add timestamp like lastActiveTimestamp or something like that. Hope it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants