pub(in sync::v3) fn assemble_threads(
thread_counts: Option<BTreeMap<OwnedEventId, (u64, u64)>>,
send_zero: impl Fn(&OwnedEventId) -> bool,
) -> BTreeMap<OwnedEventId, UnreadNotificationsCount>Expand description
MSC3773 per-thread counts for a room the round reports.
Clients read a thread missing from the map as having no notifications
(matrix-js-sdk clears that thread’s badge), so every non-zero count is sent
whether or not it changed. A zero is sent only where send_zero admits it.