Tracks outbound message delivery confirmation and handles the silent-drop fallback strategy for self-chat messages.
Summary
Functions
Handles the confirmation timeout: checks message status and optionally retries via fallback.
Schedules a confirmation timer for an outbound message when the destination is the user's own JID.
Functions
Handles the confirmation timeout: checks message status and optionally retries via fallback.
start_worker_fn receives (state, jid, fun) and must return
{:ok, worker, mon} | {:error, reason}.
send_fn receives (session_pid, state, jid, text, opts) and performs the
actual send.
Returns the updated state.
@spec schedule(map(), String.t(), String.t(), String.t(), term(), non_neg_integer(), [ {:timeout_ms, pos_integer()} ]) :: map()
Schedules a confirmation timer for an outbound message when the destination is the user's own JID.
Returns the updated state.