ExWapp.Message.Handler.Inbound.Publisher (ExWapp v0.1.2)

Copy Markdown View Source

Projects normalized inbound data into the public chat message and event stream.

This boundary owns chat persistence and :new_message publication. It does not parse wire payloads, decrypt Signal content, or plan receipts.

Summary

Functions

Persists and publishes one normalized inbound message unless it is internal.

Types

envelope()

@type envelope() :: %{
  id: term(),
  from: term(),
  from_me: boolean(),
  timestamp: term(),
  participant: term(),
  type: term(),
  attrs: map()
}

Functions

publish(message_data, envelope, session, state)

@spec publish(map(), envelope(), term(), map()) ::
  {:published, map()} | {:suppressed, map()} | {:error, term()}

Persists and publishes one normalized inbound message unless it is internal.