Skip to content

Commit

Permalink
Adjust field in LinkCapabilities struct (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
gferon committed Jul 22, 2024
1 parent 8cd92cd commit 1b59154
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libsignal-service/src/provisioning/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ pub async fn link_device<
registration_id,
pni_registration_id,
fetches_messages: true,
capabilities: LinkCapabilities { pni: true },
capabilities: LinkCapabilities::default(),
name: encrypted_device_name,
},
device_activation_request: DeviceActivationRequest {
Expand Down
9 changes: 8 additions & 1 deletion libsignal-service/src/push_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,14 @@ pub struct LinkAccountAttributes {
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct LinkCapabilities {
pub pni: bool,
pub delete_sync: bool,
}

// https://github.com/signalapp/Signal-Desktop/blob/1e57db6aa4786dcddc944349e4894333ac2ffc9e/ts/textsecure/WebAPI.ts#L1287
impl Default for LinkCapabilities {
fn default() -> Self {
Self { delete_sync: true }
}
}

#[derive(Debug, Deserialize)]
Expand Down

0 comments on commit 1b59154

Please sign in to comment.