Skip to content

Commit

Permalink
Add Configuration sync message sending
Browse files Browse the repository at this point in the history
  • Loading branch information
direc85 committed Jun 26, 2024
1 parent 5a496fd commit f6eabca
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 @@ -657,6 +657,25 @@ where
Ok(())
}

/// Send `Configuration` synchronization message
#[tracing::instrument(skip(self))]
pub async fn send_configuration(
&mut self,
recipient: &ServiceAddress,
configuration: sync_message::Configuration,
) -> Result<(), MessageSenderError> {
let msg = SyncMessage {
configuration: Some(configuration),
..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 f6eabca

Please sign in to comment.