Chime.Device (Chime v0.1.0-dev)

Copy Markdown View Source

A person's device, for the :push channel:

  • :kind - "web" (a browser's Web Push subscription), "apns" (an iPhone's or a Mac's token) or "fcm" (an Android phone's token, or any app's of Firebase);
  • :token - the subscription's endpoint, or the token;
  • :keys - a Web Push subscription's "p256dh" and "auth";
  • :name - what the person calls it ("Ana's iPhone"), or nil;
  • :enabled - whether it gets notifications: a person turns a device off and on, and keeps it;
  • :last_used_at - when a push last went to it.

A device a service says is gone (an unsubscribed browser, an app removed) is deleted, and the log says so.

Summary

Types

t()

@type t() :: %Chime.Device{
  __meta__: term(),
  enabled: term(),
  id: term(),
  inserted_at: term(),
  keys: term(),
  kind: term(),
  last_used_at: term(),
  name: term(),
  recipient: term(),
  token: term(),
  updated_at: term()
}