Skip to main content

merge_remote_master_key

Function merge_remote_master_key 

Source
async fn merge_remote_master_key<F>(
    services: &Services,
    sender_user: Option<&UserId>,
    allowed_signatures: &F,
    user: &UserId,
    master_key_raw: Raw<CrossSigningKey>,
) -> Result<Raw<CrossSigningKey>>
where F: Fn(&UserId) -> bool + Send + Sync,
Expand description

Merges our cached signatures onto a remote-supplied master key.

The returned copy carries only the cached signatures the requester may see, while the stored copy carries every signature of our cached key. A failed store is logged and leaves the returned copy as it is.