GameServer.Push.Message (game_server_sdk v1.0.1070)

Copy Markdown View Source

Validated push message struct from GameServer.

This is a stub module for SDK type definitions. The actual struct is provided by GameServer at runtime. GameServer.Push.send_to_user/3 accepts a plain map with these keys — plugins rarely build the struct directly.

Fields

  • title - Required, capped by LIMIT_MAX_PUSH_TITLE
  • body - Optional body text, capped by LIMIT_MAX_PUSH_BODY
  • data - Optional custom key/value map delivered to the app
  • image - Optional image URL
  • sound - Optional sound name
  • badge - Optional iOS badge count
  • collapse_key - Optional dedupe key; a newer push replaces an older one with the same key on-device

Summary

Types

t()

@type t() :: %GameServer.Push.Message{
  badge: non_neg_integer() | nil,
  body: String.t() | nil,
  collapse_key: String.t() | nil,
  data: map() | nil,
  image: String.t() | nil,
  sound: String.t() | nil,
  title: String.t()
}