feat(chat): use Phoenix.Presence to show online users

This commit is contained in:
2024-11-12 23:56:28 +00:00
parent 503efaf10b
commit 124e18d656
5 changed files with 121 additions and 1 deletions

View 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