Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HMAC, Fix DM Syncing #1442

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 1 addition & 2 deletions xmtp_mls/src/groups/device_sync/message_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ where
&self,
conn: &DbConnection,
) -> Result<Vec<Syncable>, DeviceSyncError> {
let groups =
conn.find_groups(GroupQueryArgs::default().conversation_type(ConversationType::Group))?;
let groups = conn.find_groups(GroupQueryArgs::default())?;

let mut all_messages = vec![];
for StoredGroup { id, .. } in groups.into_iter() {
Expand Down
7 changes: 5 additions & 2 deletions xmtp_mls/src/groups/mls_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,9 @@ where
intent.id
);

let messages = self.prepare_group_messages(vec![payload_slice])?;self.client
let messages = self.prepare_group_messages(vec![payload_slice])?;

self.client
.api()
.send_group_messages(messages)
.await?;
Expand Down Expand Up @@ -1464,7 +1466,8 @@ where
let mut result = vec![];
for payload in payloads {
let mut sender_hmac = sender_hmac.clone();
sender_hmac.update(payload);
// When we switch to V2, update with the header bytes.
sender_hmac.update(&[]);
let sender_hmac = sender_hmac.finalize();

result.push(GroupMessageInput {
Expand Down