Skip to content

Commit

Permalink
Add Keys sync message
Browse files Browse the repository at this point in the history
  • Loading branch information
direc85 committed Aug 24, 2024
1 parent 3b8656a commit b5d91a5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions libsignal-service/src/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,25 @@ where
Ok(())
}

/// Send `Keys` synchronization message
#[tracing::instrument(skip(self))]
pub async fn send_keys(
&mut self,
recipient: &ServiceAddress,
keys: sync_message::Keys,
) -> Result<(), MessageSenderError> {
let msg = SyncMessage {
keys: Some(keys),
..SyncMessage::with_padding()
};

let ts = Utc::now().timestamp_millis() as u64;
self.send_message(recipient, None, msg, ts, false, false)
.await?;

Ok(())
}

#[tracing::instrument(level = "trace", skip(self))]
fn create_pni_signature(
&mut self,
Expand Down

0 comments on commit b5d91a5

Please sign in to comment.