eco-pro/elm-phoenix-ports/1.0.0

Rerouted (archive, verified). The original repository is gone. This copy comes from an archive (Software Heritage). The Lamdera package server serves a copy recovered from swh:1:rev:1944ed1c5ca26cf275cdf9c8775ec7beb06f860c (Software Heritage, origin https://github.com/eco-pro/elm-phoenix-ports).

What we checked: Software Heritage archived tag 1.0.0 of github.com/eco-pro/elm-phoenix-ports at commit 1944ed1c5ca2; its commit 1944ed1c5ca2 is from 2021-09-10 15:19 UTC, before the version was published (2021-09-10 15:22 UTC); elm.json is byte-identical to package.elm-lang.org's; the exposed modules match docs.json; the zip is our own, made from Software Heritage's copy of the files Elm uses, so its SHA-1 is not the published one.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/eco-pro/elm-phoenix-ports/zipball/1.0.0/

Phoenix.Presence

Presence is an extension for channels to support the Presence feature of Phoenix.

Definition

type alias Presence msg =
PhoenixPresence msg

Representation of a Presence configuration

Helpers

create : PhoenixPresence msg

Create a Presence configuration

(Dict String (List Value) -> msg)
-> PhoenixPresence msg
-> PhoenixPresence msg

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}]
}
(Dict String (List Value) -> msg)
-> PhoenixPresence msg
-> PhoenixPresence msg

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.

(Dict String (List Value) -> msg)
-> PhoenixPresence msg
-> PhoenixPresence msg

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.

map : (a -> b) -> PhoenixPresence a -> PhoenixPresence b

Maps the callbacks