Phoenix Channel feature 'Presence'

I just updated my project Phoenix to get the new feature ‘Presence’. Base on the nice post Chris McCord made. I would like to know if it’s possible to get the events presence_state and presence_diff on the server side instead on the client side. Because I would like to get those events to notify other channels when user join or leave the chat.

3 Likes

That would just be the standard intercept call with handle_out’s. I use it with presence since presence has no way that I’ve found to change its message ID’s, which sucks when using multiple presence’s in one place for different purposes. ^.^

1 Like

Could you show an example because I did not see exactly ? how you want to do…

1 Like

Certainly. :slight_smile:
http://www.phoenixframework.org/docs/channels#section-intercepting-outgoing-events

1 Like

ok great thanks. Just this handle_out I need to set it into my Channel file or my Presence file ?

Channel file, and the intercept too.