pub fn inbound_text(
packet: &ReceivedPacketRef<'_>,
local_key: &PublicKey,
well_known: &WellKnownChannels,
) -> Option<Inbound>Expand description
Classify a received frame for a chat session whose identity is
local_key.
None for anything that is not a text frame a chat session holds: another
payload type, a unicast or blind unicast without its sender’s key, a
multicast without a claimed hint, or another packet family.
The checks on the well-known channels live here, at the chat layer, rather
than under the MAC: the requirements are about chat messages, and the MAC
is deliberately incurious about what it carries. A frame that fails one is
refused rather than shown unmarked—a message the reader would act on in an
emergency must not arrive with its origin or its reach in question.
EMERGENCY chat must also be signed, but the text-message format has no
signature yet, so that requirement is neither sent nor checked.