View Source Bonfire.UI.Common.Presence (Bonfire v0.9.11-social-beta.6)

WIP for tracking online users. Used by PersistentLive

Summary

Functions

child_spec(opts)

fetch(topic, presences)

Callback implementation for Phoenix.Presence.fetch/2.

fetchers_pids()

get_by_key(topic, key)

Callback implementation for Phoenix.Presence.get_by_key/2.

handle_info(broadcast, socket)

list()

list(topic)

Callback implementation for Phoenix.Presence.list/1.

list_and_maybe_subscribe_to_presence(socket)

present!(socket, meta \\ %{})

Join a user to the list of those who are present

present?(user_id \\ nil, socket)

Check if a given user (or the current user) is in the list of those who are present

present_meta(user \\ nil, socket)

track(socket, key, meta)

Callback implementation for Phoenix.Presence.track/3.

track(pid, topic, key, meta)

Callback implementation for Phoenix.Presence.track/4.

untrack(socket, key)

Callback implementation for Phoenix.Presence.untrack/2.

untrack(pid, topic, key)

Callback implementation for Phoenix.Presence.untrack/3.

update(socket, key, meta)

Callback implementation for Phoenix.Presence.update/3.

update(pid, topic, key, meta)

Callback implementation for Phoenix.Presence.update/4.