Presence is an extension for channels to support the Presence feature of Phoenix.
Create a Presence configuration
This will be called each time the Presence state changes. The Dict contains as keys your presence keys and
as values a list of the payloads you sent from the server.
If you have on the elixir side Presence.track(socket, user_name, %{online_at: now()})
then an example would be a Dict with
{ "user1": [{online_at: 1491493666123}]
, "user2": [{online_at: 1491492646123}, {online_at: 1491492646624}]
}This will be called each time user some user joins. This callback is useful to have special events
if a user joins. To obtain a list of all users use onChange.
This will be called each time user some user leaves. This callback is useful to have special events
if a user leaves. To obtain a list of all users use onChange.
Maps the callbacks
Representation of a Presence configuration