Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/phoenix/presence.ex
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,12 @@ defmodule Phoenix.Presence do
devices, could return:

iex> MyPresence.get_by_key("room:1", "user1")
[%{name: "User 1", metas: [%{device: "Desktop"}, %{device: "Mobile"}]}]
%{name: "User 1", metas: [%{device: "Desktop"}, %{device: "Mobile"}]}

Like `c:list/1`, the presence metadata is passed to the `fetch`
callback of your presence module to fetch any additional information.
"""
@callback get_by_key(Phoenix.Socket.t() | topic, key :: String.t()) :: [presence]
@callback get_by_key(Phoenix.Socket.t() | topic, key :: String.t()) :: map() | []

@doc """
Extend presence information with additional data.
Expand Down