Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 29 additions & 5 deletions wacore/appstate/src/schemas.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Auto-generated AppState (syncd) action schemas (WhatsApp 2.3000.1040878135). DO NOT EDIT.
//! Auto-generated AppState (syncd) action schemas (WhatsApp 2.3000.1042742319). DO NOT EDIT.
//!
//! Typed registry of syncd actions: collection, version, scope, value proto type,
//! enum fields, and the mutation-index parts. `const`/`&'static`, no deps.
Expand Down Expand Up @@ -249,9 +249,9 @@ pub const AVATAR_UPDATED: Schema = Schema {
collection: Collection::Regular,
version: 7,
scope: Scope::Account,
value_field: Some("avatarUpdatedAction"),
value_proto_type: Some("SyncActionValue.AvatarUpdatedAction"),
value_enum_fields: &[("eventType", "AvatarUpdatedAction.AvatarEventType")],
value_field: None,
value_proto_type: None,
value_enum_fields: &[],
chat_jid_index: None,
index_parts: &[IndexPart::Literal {
value: "avatar_updated_action",
Expand Down Expand Up @@ -1252,7 +1252,10 @@ pub const STATUS_PRIVACY: Schema = Schema {
scope: Scope::Account,
value_field: Some("statusPrivacy"),
value_proto_type: Some("SyncActionValue.StatusPrivacyAction"),
value_enum_fields: &[],
value_enum_fields: &[
("mode", "StatusPrivacyAction.StatusDistributionMode"),
("modes", "StatusPrivacyAction.StatusDistributionMode"),
],
chat_jid_index: None,
index_parts: &[IndexPart::Literal {
value: "status_privacy",
Expand Down Expand Up @@ -1364,6 +1367,26 @@ pub const WAFFLE_ACCOUNT_LINK_STATE: Schema = Schema {
}],
};

/// `WasaRootSecret` — module `WAWebWASARootSecretSync`.
pub const WASA_ROOT_SECRET: Schema = Schema {
key: "WasaRootSecret",
name: "wasa_root_secret",
module: "WAWebWASARootSecretSync",
collection: Collection::RegularHigh,
version: 1,
scope: Scope::Chat,
value_field: Some("wasaRootSecretAction"),
value_proto_type: Some("SyncActionValue.WASARootSecretAction"),
value_enum_fields: &[],
chat_jid_index: Some(1),
index_parts: &[
IndexPart::Literal {
value: "wasa_root_secret",
},
IndexPart::Jid { name: "chatJid" },
],
};

/// Every action schema, keyed-sorted.
pub const ALL: &[Schema] = &[
ADS_CTWA_PER_CUSTOMER_DATA_SHARING,
Expand Down Expand Up @@ -1431,6 +1454,7 @@ pub const ALL: &[Schema] = &[
USER_STATUS_MUTE,
VOIP_RELAY_ALL_CALLS,
WAFFLE_ACCOUNT_LINK_STATE,
WASA_ROOT_SECRET,
];

/// Look up a schema by its action key (the registry key, e.g. `"Agent"`).
Expand Down
3 changes: 3 additions & 0 deletions wacore/libsignal/src/protocol/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@ impl PreKeySignalMessage {
base_key: Some(base_key.serialize().to_vec()),
identity_key: Some(identity_key.serialize().to_vec()),
message: Some(Vec::from(message.as_ref())),
// Post-quantum (Kyber) prekeys are not implemented; classic X3DH only.
kyber_pre_key_id: None,
kyber_ciphertext: None,
};
let mut size_cache = buffa::SizeCache::new();
let message_len = proto_message.compute_size(&mut size_cache) as usize;
Expand Down
3 changes: 3 additions & 0 deletions wacore/libsignal/src/protocol/state/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,9 @@ impl SessionState {
pre_key_id: pre_key_id.map(PreKeyId::into),
signed_pre_key_id: Some(signed_ec_pre_key_id as i32),
base_key: Some(base_key.serialize().to_vec()),
// Post-quantum (Kyber) prekeys are not implemented; classic X3DH only.
kyber_pre_key_id: None,
kyber_ciphertext: None,
};
self.session.pending_pre_key = MessageField::some(pending);
}
Expand Down
Loading
Loading