pub fn build_receipt_event(
conn: &Connection,
caller_user_id: i64,
receipts: &[ReceiptRow],
) -> Result<Option<Value>, MatrixError>Expand description
One coalesced m.receipt ephemeral event (plan §3.6): every m.read
receipt (visible to the whole room by definition) plus ONLY the caller’s
own m.read.private receipt — Matrix’s own privacy rule that a private
receipt must never reach another user’s /sync. None when receipts
contained only OTHER users’ private receipts — after the privacy filter
there is nothing left worth an (otherwise empty-content) event at all,
and an empty-but-present m.receipt event would wrongly count as “this
room changed” for the emptiness check that gates a room’s inclusion.