Pure delivery / view-filtering predicate.
Sender always sees their own envelope; broadcasts (audience=None) are visible to all session participants; subset addressing is visible only to listed peers.
Source code in autogen/beta/network/envelope.py
| def visible_to(envelope: Envelope, participant_id: str) -> bool:
"""Pure delivery / view-filtering predicate.
Sender always sees their own envelope; broadcasts (``audience=None``)
are visible to all session participants; subset addressing is
visible only to listed peers.
"""
if envelope.sender_id == participant_id:
return True
if envelope.audience is None:
return True
return participant_id in envelope.audience
|