Skip to content

Commit

Permalink
Merge pull request #302 from whisperfish/sync-messages
Browse files Browse the repository at this point in the history
Add Configuration sync message sending
  • Loading branch information
rubdos committed Jun 26, 2024
2 parents 5a496fd + f6eabca commit 42fc0d4
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 42fc0d4

Please sign in to comment.