feat(chat): use Phoenix.Presence to show online users
This commit is contained in:
11
lib/slax_web/channels/presence.ex
Normal file
11
lib/slax_web/channels/presence.ex
Normal file
@@ -0,0 +1,11 @@
|
||||
defmodule SlaxWeb.Presence do
|
||||
@moduledoc """
|
||||
Provides presence tracking to channels and processes.
|
||||
|
||||
See the [`Phoenix.Presence`](https://hexdocs.pm/phoenix/Phoenix.Presence.html)
|
||||
docs for more details.
|
||||
"""
|
||||
use Phoenix.Presence,
|
||||
otp_app: :slax,
|
||||
pubsub_server: Slax.PubSub
|
||||
end
|
Reference in New Issue
Block a user