-
Notifications
You must be signed in to change notification settings - Fork 96
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
Add presence support #32
Conversation
Codecov Report
@@ Coverage Diff @@
## master #32 +/- ##
==========================================
- Coverage 100% 96.42% -3.58%
==========================================
Files 6 6
Lines 22 28 +6
==========================================
+ Hits 22 27 +5
- Misses 0 1 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sreecodeslayer We agree that Phoenix presence is a desirable feature to add. 🚀
However the purpose of this repository is to serve as a beginner tutorial for Phoenix.
As such we cannot accept a pull request without tests and documentation consistent with the existing example(s).
If you have time to add a couple of tests for the code, please do.
Thanks! 👍
Given that there is quite a divergence from this |
There is a gotcha here:
Since there is no concept of user logins and sessions based on it, I felt its okay to mark a user as online once a message with a name is made. Presence would then track that particular user as opposed to tracking when the page loads.
Also, I've added a timestamp field to the Phoenix Presence tracker in the backend, but I chose to keep the UI simple.
Closes #14