View Source Glific.Flows.MessageBroadcast (Glific v5.1.6)

When we are running a flow, we are running it in the context of a contact and/or a conversation (or other Glific data types). Let encapsulate this in a module and isolate the flow from the other aspects of Glific

Link to this section Summary

Functions

Standard changeset pattern we use for all data types

Link to this section Types

@type t() :: %Glific.Flows.MessageBroadcast{
  __meta__: Ecto.Schema.Metadata.t(),
  completed_at: :utc_datetime | nil,
  default_results: map() | nil,
  flow: Glific.Flows.Flow.t() | Ecto.Association.NotLoaded.t() | nil,
  flow_id: non_neg_integer() | nil,
  group: Glific.Groups.Group.t() | Ecto.Association.NotLoaded.t() | nil,
  group_id: non_neg_integer() | nil,
  id: term(),
  inserted_at: :utc_datetime | nil,
  message: Glific.Messages.Message.t() | Ecto.Association.NotLoaded.t() | nil,
  message_id: non_neg_integer() | nil,
  message_params: map() | nil,
  organization:
    Glific.Partners.Organization.t() | Ecto.Association.NotLoaded.t() | nil,
  organization_id: non_neg_integer() | nil,
  started_at: :utc_datetime | nil,
  type: String.t() | nil,
  updated_at: :utc_datetime | nil,
  user: Glific.Users.User.t() | Ecto.Association.NotLoaded.t() | nil,
  user_id: non_neg_integer() | nil
}

Link to this section Functions

Link to this function

changeset(message_broadcast, attrs)

View Source
@spec changeset(t(), map()) :: Ecto.Changeset.t()

Standard changeset pattern we use for all data types