asobi_notify (asobi v0.72.6)

View Source

Delivery of notifications to players.

send_many/4 returns {ok, Succeeded, Failed} rather than the list of recipients it managed to reach. The old shape could not express partial failure at all - it dropped failed inserts on the floor - and its one operator-facing caller then audited a half-delivered broadcast as a success. The widened shape is asobi_ops_audit's outcome contract, so an operator-attributed fan-out is auditable without the call site reconstructing what happened.

Summary

Functions

send(PlayerId, Type, Subject, Content)

-spec send(binary(), binary(), binary(), map()) -> {ok, map()} | {error, term()}.

send_many(PlayerIds, Type, Subject, Content)

-spec send_many([binary()], binary(), binary(), map()) -> {ok, [binary()], [{binary(), term()}]}.

Send one notification to each of PlayerIds.

Every recipient is attempted; one failure does not abandon the rest. Returns {ok, Succeeded, Failed}, Failed carrying each recipient with the reason it could not be delivered.