phoenix-chat-example icon indicating copy to clipboard operation
phoenix-chat-example copied to clipboard

Add presence support

Open sreecodeslayer opened this issue 4 years ago β€’ 2 comments

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

sreecodeslayer avatar Oct 12 '19 11:10 sreecodeslayer

Codecov Report

Merging #32 into master will decrease coverage by 3.57%. The diff coverage is 85.71%.

Impacted file tree graph

@@            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
Impacted Files Coverage Ξ”
lib/chat/application.ex 100% <ΓΈ> (ΓΈ) :arrow_up:
lib/chat_web/channels/room_channel.ex 93.75% <85.71%> (-6.25%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 89d5d11...c6063c1. Read the comment docs.

codecov[bot] avatar Oct 12 '19 11:10 codecov[bot]

https://github.com/dwyl/phoenix-liveview-chat-example#14-presence

nelsonic avatar Jun 24 '22 06:06 nelsonic

Given that there is quite a divergence from this PR to the main branch and even larger once https://github.com/dwyl/phoenix-chat-example/pull/152 (Phoenix v1.7 update) is merged. I'm reluctantly closing this. 😞 Would love to have this contribution re-created off main with tests. 🀞

nelsonic avatar Feb 03 '23 15:02 nelsonic