pub fn mark_request_as_sent(&self, request_id: &Uuid) {
        if let Some((_, r)) = self.to_share_with_set.remove(request_id) {
            let user_pairs = r.messages.iter().map(|(u, v)| {
                (
                    u.clone(),
                    v.keys().filter_map(|d| {
                        if let DeviceIdOrAllDevices::DeviceId(d) = d {
                            Some(d.clone())
                        } else {
                            None
                        }
                    }),
                )
            });

            user_pairs.for_each(|(u, d)| {
                self.shared_with_set
                    .entry(u)
                    .or_insert_with(DashSet::new)
                    .extend(d);
            });

            if self.to_share_with_set.is_empty() {
                debug!(
                    "Marking session {} for room {} as shared.",
                    self.session_id(),
                    self.room_id
                );
                self.mark_as_shared();
            }
        }
    }
/// Mark the request with the given request id as sent.
///
/// This removes the request from the queue and marks the set of
/// users/devices that received the session.
Mark the request with the given request id as sent.
This removes the request from the queue and marks the set of
users/devices that received the session.
Mark the request with the given request id as sent . This removes the request from the queue and marks the set of users / devices that received the session .
pub fn mark_request_as_sent(&self, request_id: &Uuid) {
        if let Some((_, r)) = self.to_share_with_set.remove(request_id) {
            let user_pairs = r.messages.iter().map(|(u, v)| {
                (
                    u.clone(),
                    v.keys().filter_map(|d| {
                        if let DeviceIdOrAllDevices::DeviceId(d) = d {
                            Some(d.clone())
                        } else {
                            None
                        }
                    }),
                )
            });
            user_pairs.for_each(|(u, d)| {
                self.shared_with_set
                    .entry(u)
                    .or_insert_with(DashSet::new)
                    .extend(d);
            });
            if self.to_share_with_set.is_empty() {
                debug!(
                    "Marking session {} for room {} as shared.",
                    self.session_id(),
                    self.room_id
                );
                self.mark_as_shared();
            }
        }
    }
pub fn mark_request_as_sent ( & self , request_id : & Uuid ) { if let Some ( ( _ , r ) ) = self . to_share_with_set . remove ( request_id ) { let user_pairs = r . messages . iter ( ) . map ( | ( u , v ) | { ( u . clone ( ) , v . keys ( ) . filter_map ( | d | { if let DeviceIdOrAllDevices :: DeviceId ( d ) = d { Some ( d . clone ( ) ) } else { None } } ) , ) } ) ; user_pairs . for_each ( | ( u , d ) | { self . shared_with_set . entry ( u ) . or_insert_with ( DashSet :: new ) . extend ( d ) ; } ) ; if self . to_share_with_set . is_empty ( ) { debug ! ( " " self session_id ( ) self room_id ) ; self . mark_as_shared ( ) ; } } }
Mark the request with the given request id as sent.
Mark the request with the given request id as sent .
&self
request_id
&Uuid
&self
request_id
&Uuid