ExStreamClient.Model.MessageNewEvent (ExStreamClient v0.2.0)

Copy Markdown View Source

Schema representing a MessageNewEvent

Summary

Functions

Components could just be enums that are typed - so we need to decode those as enums as they will just be stings

Types

t()

@type t() :: %ExStreamClient.Model.MessageNewEvent{
  channel: ExStreamClient.Model.Channel.t() | nil,
  channel_custom: %{optional(String.t()) => any()} | nil,
  channel_id: String.t() | nil,
  channel_last_message_at: String.t() | nil,
  channel_member_count: integer() | nil,
  channel_message_count: integer() | nil,
  channel_type: String.t() | nil,
  cid: String.t() | nil,
  created_at: DateTime.t() | integer() | String.t(),
  custom: %{optional(String.t()) => any()},
  grouped_unread_channels: %{optional(String.t()) => integer()} | nil,
  members: [ExStreamClient.Model.ChannelMember.t()] | nil,
  message: ExStreamClient.Model.MessageResponse.t(),
  message_id: String.t() | nil,
  parent_author: String.t() | nil,
  received_at: (DateTime.t() | integer() | String.t()) | nil,
  team: String.t() | nil,
  thread_participants:
    [ExStreamClient.Model.UserResponseCommonFields.t()] | nil,
  total_unread_count: integer() | nil,
  type: String.t(),
  unread_channels: integer() | nil,
  unread_count: integer() | nil,
  user: ExStreamClient.Model.UserResponseCommonFields.t() | nil,
  watcher_count: integer()
}

Functions

decode(map)

Components could just be enums that are typed - so we need to decode those as enums as they will just be stings

nested_components()